Skip to content

Commit

Permalink
Avoid function pointer type syntax in function arguments.
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
  • Loading branch information
hidmic committed Oct 25, 2021
1 parent c23ca1b commit 6e9286f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rclcpp/include/rclcpp/exceptions/exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ class UnimplementedError : public std::runtime_error
: std::runtime_error(msg) {}
};

typedef void (*reset_error_function_t)();

/// Throw a C++ std::exception which was created based on an rcl error.
/**
* Passing nullptr for reset_error is safe and will avoid calling any function
Expand All @@ -129,7 +131,7 @@ throw_from_rcl_error [[noreturn]] (
rcl_ret_t ret,
const std::string & prefix = "",
const rcl_error_state_t * error_state = nullptr,
void (* reset_error)() = rcl_reset_error);
reset_error_function_t reset_error = rcl_reset_error);
/* *INDENT-ON* */

class RCLErrorBase
Expand Down

0 comments on commit 6e9286f

Please sign in to comment.