Skip to content

Commit

Permalink
clang-tidy knows that assert is used only in debug mode.
Browse files Browse the repository at this point in the history
Remove n_points from the argument list.
  • Loading branch information
joaander committed Jun 24, 2024
1 parent 6f6a408 commit 4b44cf4
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cpp/box/Box.h
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
#define BOX_H

#include <algorithm>
#include <cassert>
#include <complex>
#include <sstream>
#include <stdexcept>
@@ -425,9 +424,8 @@ class Box
query_point (overwritten in place).
*/
void computeDistances(const vec3<float>* query_points, const unsigned int n_query_points,
const vec3<float>* points, const unsigned int n_points, float* distances) const
const vec3<float>* points, float* distances) const
{
assert(n_query_points == n_points);
util::forLoopWrapper(0, n_query_points, [&](size_t begin, size_t end) {
for (size_t i = begin; i < end; ++i)
{
2 changes: 1 addition & 1 deletion cpp/box/export_Box.cc
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ void computeDistances(const std::shared_ptr<Box>& box, nb_array<float> query_poi
{
throw std::invalid_argument("The number of query points and points must match.");
}
box->computeDistances(query_points_data, n_query_points, points_data, n_points, distances_data);
box->computeDistances(query_points_data, n_query_points, points_data, distances_data);
}

void computeAllDistances(const std::shared_ptr<Box>& box, nb_array<float> query_points,

0 comments on commit 4b44cf4

Please sign in to comment.