From 67ee08b57010014bd24421fc48757ef05037ee5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mart=C3=ADn=20Rico?= Date: Fri, 15 Mar 2024 05:42:09 +0100 Subject: [PATCH] Fix clear_activation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Francisco Martín Rico --- .../src/rclcpp_cascade_lifecycle/rclcpp_cascade_lifecycle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rclcpp_cascade_lifecycle/src/rclcpp_cascade_lifecycle/rclcpp_cascade_lifecycle.cpp b/rclcpp_cascade_lifecycle/src/rclcpp_cascade_lifecycle/rclcpp_cascade_lifecycle.cpp index e34b6e8..aa7154b 100644 --- a/rclcpp_cascade_lifecycle/src/rclcpp_cascade_lifecycle/rclcpp_cascade_lifecycle.cpp +++ b/rclcpp_cascade_lifecycle/src/rclcpp_cascade_lifecycle/rclcpp_cascade_lifecycle.cpp @@ -202,8 +202,8 @@ CascadeLifecycleNode::remove_activation(const std::string & node_name) void CascadeLifecycleNode::clear_activation() { - for (const auto & activation : activations_) { - remove_activation(activation); + while (!activations_.empty()) { + remove_activation(*activations_.begin()); } }