Skip to content

Commit e6ad86b

Browse files
mauropasseMauro Passerino
authored andcommitted
Fix clang warning: bugprone-use-after-move (ros2#2116)
Signed-off-by: Mauro Passerino <[email protected]> Co-authored-by: Mauro Passerino <[email protected]>
1 parent ef5dfde commit e6ad86b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

rclcpp/include/rclcpp/experimental/intra_process_manager.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,11 @@ 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+
<<<<<<< HEAD
929930
// Nothing else to do
931+
=======
932+
// Last message delivered, break from for loop
933+
>>>>>>> 1a9b117d (Fix clang warning: bugprone-use-after-move (#2116))
930934
break;
931935
} else {
932936
// Copy the message since we have additional subscriptions to serve
@@ -967,7 +971,7 @@ class IntraProcessManager
967971
if (std::next(it) == subscription_ids.end()) {
968972
// If this is the last subscription, give up ownership
969973
ros_message_subscription->provide_intra_process_message(std::move(message));
970-
// Nothing else to do
974+
// Last message delivered, break from for loop
971975
break;
972976
} else {
973977
// Copy the message since we have additional subscriptions to serve

0 commit comments

Comments
 (0)