diff --git a/cpp/kiss_icp/core/VoxelHashMap.cpp b/cpp/kiss_icp/core/VoxelHashMap.cpp index 9789fec1..533e2c22 100644 --- a/cpp/kiss_icp/core/VoxelHashMap.cpp +++ b/cpp/kiss_icp/core/VoxelHashMap.cpp @@ -77,11 +77,11 @@ void VoxelHashMap::AddPoints(const std::vector &points) { auto search = map_.find(voxel); if (search != map_.end()) { auto &voxel_points = search.value(); - if (voxel_points.size() == max_points_per_voxel_ or - std::any_of(voxel_points.cbegin(), voxel_points.cend(), - [&](const auto &voxel_point) { - return (voxel_point - point).norm() < map_resolution; - })) { + if ((voxel_points.size() == max_points_per_voxel_) or + (std::any_of(voxel_points.cbegin(), voxel_points.cend(), + [&](const auto &voxel_point) { + return (voxel_point - point).norm() < map_resolution; + }))) { return; } voxel_points.emplace_back(point);