Skip to content

Commit

Permalink
refactor: use range-based for loop
Browse files Browse the repository at this point in the history
Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
  • Loading branch information
kobayu858 committed Jul 10, 2024
1 parent 827e180 commit 08a3916
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ bool LidarApolloInstanceSegmentation::detectDynamicObjects(
score_threshold_, height_thresh, min_pts_num, output, transformed_cloud.header);

// move down pointcloud z_offset in z axis
for (std::size_t i = 0; i < output.feature_objects.size(); i++) {
for (auto & feature_object : output.feature_objects) {
sensor_msgs::msg::PointCloud2 updated_cloud;
transformCloud(output.feature_objects.at(i).feature.cluster, updated_cloud, -z_offset_);
output.feature_objects.at(i).feature.cluster = updated_cloud;
transformCloud(feature_object.feature.cluster, updated_cloud, -z_offset_);
feature_object.feature.cluster = updated_cloud;

Check warning on line 187 in perception/lidar_apollo_instance_segmentation/src/detector.cpp

View check run for this annotation

Codecov / codecov/patch

perception/lidar_apollo_instance_segmentation/src/detector.cpp#L186-L187

Added lines #L186 - L187 were not covered by tests
}

output.header = transformed_cloud.header;
Expand Down

0 comments on commit 08a3916

Please sign in to comment.