Skip to content

Commit

Permalink
fix(reaction_analyzer): fix constVariableReference (#8063)
Browse files Browse the repository at this point in the history
* fix:constVariableReference

Signed-off-by: kobayu858 <[email protected]>

* fix:constVariableReference

Signed-off-by: kobayu858 <[email protected]>

* fix:constVariableReference

Signed-off-by: kobayu858 <[email protected]>

* fix:suppression constVariableReference

Signed-off-by: kobayu858 <[email protected]>

---------

Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 authored Jul 21, 2024
1 parent b174281 commit 2cb6524
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/reaction_analyzer/src/subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ void SubscriberBase::on_trajectory(
if (zero_vel_idx) {
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
// set header time
// cppcheck-suppress constVariableReference
auto & buffer = std::get<MessageBuffer>(variant);
buffer->header.stamp = msg_ptr->header.stamp;
buffer->published_stamp = msg_ptr->header.stamp;
Expand Down Expand Up @@ -363,6 +364,7 @@ void SubscriberBase::on_pointcloud(
if (search_pointcloud_near_pose(pcl_pointcloud, entity_pose_, entity_search_radius_)) {
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
// set header time
// cppcheck-suppress constVariableReference
auto & buffer = std::get<MessageBuffer>(variant);
buffer->header.stamp = msg_ptr->header.stamp;
buffer->published_stamp = msg_ptr->header.stamp;
Expand Down Expand Up @@ -440,6 +442,7 @@ void SubscriberBase::on_predicted_objects(
if (search_predicted_objects_near_pose(*msg_ptr, entity_pose_, entity_search_radius_)) {
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
// set header time
// cppcheck-suppress constVariableReference
auto & buffer = std::get<MessageBuffer>(variant);
buffer->header.stamp = msg_ptr->header.stamp;
buffer->published_stamp = msg_ptr->header.stamp;
Expand Down Expand Up @@ -520,6 +523,7 @@ void SubscriberBase::on_detected_objects(
if (search_detected_objects_near_pose(output_objs, entity_pose_, entity_search_radius_)) {
RCLCPP_INFO(node_->get_logger(), "%s reacted without published time", node_name.c_str());
// set header time
// cppcheck-suppress constVariableReference
auto & buffer = std::get<MessageBuffer>(variant);
buffer->header.stamp = msg_ptr->header.stamp;
buffer->published_stamp = msg_ptr->header.stamp;
Expand Down

0 comments on commit 2cb6524

Please sign in to comment.