Skip to content

Commit

Permalink
Use rcpputils/scope_exit.hpp instead of rclcpp/scope_exit.hpp (#324)
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <[email protected]>
  • Loading branch information
christophebedard authored Aug 31, 2021
1 parent eceda75 commit 4c89542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<build_depend>pkg-config</build_depend>
<build_depend>python3-yaml</build_depend>
<build_depend>rclcpp</build_depend>
<build_depend>rcpputils</build_depend>
<build_depend>rcutils</build_depend>
<build_depend>rmw_implementation_cmake</build_depend>
<build_depend>std_msgs</build_depend>
Expand All @@ -30,6 +31,7 @@
<exec_depend>builtin_interfaces</exec_depend>
<exec_depend>python3-yaml</exec_depend>
<exec_depend>rclcpp</exec_depend>
<exec_depend>rcpputils</exec_depend>
<exec_depend>rcutils</exec_depend>
<exec_depend>std_msgs</exec_depend>

Expand Down
4 changes: 2 additions & 2 deletions src/dynamic_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

// include ROS 2
#include "rclcpp/rclcpp.hpp"
#include "rclcpp/scope_exit.hpp"
#include "rcpputils/scope_exit.hpp"

#include "ros1_bridge/bridge.hpp"

Expand Down Expand Up @@ -396,7 +396,7 @@ void get_ros1_service_info(
return;
}
ros::TransportTCPPtr transport(new ros::TransportTCP(nullptr, ros::TransportTCP::SYNCHRONOUS));
auto transport_exit = rclcpp::make_scope_exit(
auto transport_exit = rcpputils::make_scope_exit(
[transport]() {
transport->close();
});
Expand Down

0 comments on commit 4c89542

Please sign in to comment.