Skip to content

Commit 8b9604f

Browse files
author
Alberto Soragna
committed
Fix clang warning: bugprone-use-after-move (ros2#2116)
1 parent ef5dfde commit 8b9604f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rclcpp/include/rclcpp/experimental/intra_process_manager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ class IntraProcessManager
926926
if (std::next(it) == subscription_ids.end()) {
927927
// If this is the last subscription, give up ownership
928928
subscription->provide_intra_process_data(std::move(message));
929-
// Nothing else to do
929+
// Last message delivered, break from for loop
930930
break;
931931
} else {
932932
// Copy the message since we have additional subscriptions to serve
@@ -967,7 +967,7 @@ class IntraProcessManager
967967
if (std::next(it) == subscription_ids.end()) {
968968
// If this is the last subscription, give up ownership
969969
ros_message_subscription->provide_intra_process_message(std::move(message));
970-
// Nothing else to do
970+
// Last message delivered, break from for loop
971971
break;
972972
} else {
973973
// Copy the message since we have additional subscriptions to serve

0 commit comments

Comments
 (0)