Skip to content

Commit

Permalink
Fix unnecessary allocations in executor.cpp (ros2#2135)
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Wecht <cwecht@mailbox.org>
  • Loading branch information
cwecht authored and Alberto Soragna committed Apr 29, 2023
1 parent dc486c0 commit 88abfb7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rclcpp/src/rclcpp/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -558,13 +558,14 @@ Executor::execute_any_executable(AnyExecutable & any_exec)
}
}

template<typename Taker, typename Handler>
static
void
take_and_do_error_handling(
const char * action_description,
const char * topic_or_service_name,
std::function<bool()> take_action,
std::function<void()> handle_action)
Taker take_action,
Handler handle_action)
{
bool taken = false;
try {
Expand Down

0 comments on commit 88abfb7

Please sign in to comment.