From 0e323d8151d47929e735dc87b03d2b49bd99d880 Mon Sep 17 00:00:00 2001 From: kobayu858 Date: Fri, 1 Nov 2024 19:21:53 +0900 Subject: [PATCH] fix: bugprone-misplaced-widening-cast Signed-off-by: kobayu858 --- .../lib/voxel_grid_based_euclidean_cluster.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perception/autoware_euclidean_cluster/lib/voxel_grid_based_euclidean_cluster.cpp b/perception/autoware_euclidean_cluster/lib/voxel_grid_based_euclidean_cluster.cpp index 096de3dc1b296..f6e8315a02b77 100644 --- a/perception/autoware_euclidean_cluster/lib/voxel_grid_based_euclidean_cluster.cpp +++ b/perception/autoware_euclidean_cluster/lib/voxel_grid_based_euclidean_cluster.cpp @@ -117,7 +117,9 @@ bool VoxelGridBasedEuclideanCluster::cluster( voxel_grid_.getCentroidIndexAt(voxel_grid_.getGridCoordinates(point.x, point.y, point.z)); if (map.find(index) != map.end()) { auto & cluster_data_size = clusters_data_size.at(map[index]); - if (cluster_data_size > std::size_t(max_cluster_size_ * point_step)) { + if ( + cluster_data_size > + static_cast(max_cluster_size_) * static_cast(point_step)) { continue; } std::memcpy(