Skip to content

Commit f13503a

Browse files
authored
fix(autoware_image_projection_based_fusion): fix bugprone-misplaced-widening-cast (#9226)
* fix: bugprone-misplaced-widening-cast Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> * fix: clang-format Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> --------- Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent 6ec8820 commit f13503a

File tree

1 file changed

+7
-3
lines changed
  • perception/autoware_image_projection_based_fusion/src/utils

1 file changed

+7
-3
lines changed

perception/autoware_image_projection_based_fusion/src/utils/utils.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ void updateOutputFusedObjects(
159159
cluster.data.resize(clusters_data_size.at(i));
160160
auto & feature_obj = output_objs.at(i);
161161
if (
162-
cluster.data.size() < std::size_t(min_cluster_size * cluster.point_step) ||
163-
cluster.data.size() >= std::size_t(max_cluster_size * cluster.point_step)) {
162+
cluster.data.size() <
163+
static_cast<std::size_t>(min_cluster_size) * static_cast<std::size_t>(cluster.point_step) ||
164+
cluster.data.size() >=
165+
static_cast<std::size_t>(max_cluster_size) * static_cast<std::size_t>(cluster.point_step)) {
164166
continue;
165167
}
166168

@@ -169,7 +171,9 @@ void updateOutputFusedObjects(
169171
sensor_msgs::msg::PointCloud2 refine_cluster;
170172
closest_cluster(
171173
cluster, cluster_2d_tolerance, min_cluster_size, camera_orig_point_frame, refine_cluster);
172-
if (refine_cluster.data.size() < std::size_t(min_cluster_size * cluster.point_step)) {
174+
if (
175+
refine_cluster.data.size() <
176+
static_cast<std::size_t>(min_cluster_size) * static_cast<std::size_t>(cluster.point_step)) {
173177
continue;
174178
}
175179

0 commit comments

Comments
 (0)