Skip to content

Commit 2cb6524

Browse files
authored
fix(reaction_analyzer): fix constVariableReference (autowarefoundation#8063)
* fix:constVariableReference Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> * fix:constVariableReference Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> * fix:constVariableReference Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> * fix:suppression constVariableReference Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp> --------- Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
1 parent b174281 commit 2cb6524

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/reaction_analyzer/src/subscriber.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ void SubscriberBase::on_trajectory(
272272
if (zero_vel_idx) {
273273
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
274274
// set header time
275+
// cppcheck-suppress constVariableReference
275276
auto & buffer = std::get<MessageBuffer>(variant);
276277
buffer->header.stamp = msg_ptr->header.stamp;
277278
buffer->published_stamp = msg_ptr->header.stamp;
@@ -363,6 +364,7 @@ void SubscriberBase::on_pointcloud(
363364
if (search_pointcloud_near_pose(pcl_pointcloud, entity_pose_, entity_search_radius_)) {
364365
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
365366
// set header time
367+
// cppcheck-suppress constVariableReference
366368
auto & buffer = std::get<MessageBuffer>(variant);
367369
buffer->header.stamp = msg_ptr->header.stamp;
368370
buffer->published_stamp = msg_ptr->header.stamp;
@@ -440,6 +442,7 @@ void SubscriberBase::on_predicted_objects(
440442
if (search_predicted_objects_near_pose(*msg_ptr, entity_pose_, entity_search_radius_)) {
441443
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
442444
// set header time
445+
// cppcheck-suppress constVariableReference
443446
auto & buffer = std::get<MessageBuffer>(variant);
444447
buffer->header.stamp = msg_ptr->header.stamp;
445448
buffer->published_stamp = msg_ptr->header.stamp;
@@ -520,6 +523,7 @@ void SubscriberBase::on_detected_objects(
520523
if (search_detected_objects_near_pose(output_objs, entity_pose_, entity_search_radius_)) {
521524
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
522525
// set header time
526+
// cppcheck-suppress constVariableReference
523527
auto & buffer = std::get<MessageBuffer>(variant);
524528
buffer->header.stamp = msg_ptr->header.stamp;
525529
buffer->published_stamp = msg_ptr->header.stamp;

0 commit comments

Comments
 (0)