Skip to content

Commit

Permalink
Deprecated shared_ptr<MessageT> sub callbacks
Browse files Browse the repository at this point in the history
Addresses #1619.

Signed-off-by: Abrar Rahman Protyasha <abrar@openrobotics.org>
  • Loading branch information
Abrar Rahman Protyasha committed Jul 13, 2021
1 parent 0034929 commit cd90003
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions rclcpp/include/rclcpp/any_subscription_callback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,7 @@ class AnySubscriptionCallback

/// Function for shared_ptr to non-const MessageT, which is deprecated.
template<typename SetT>
// TODO(wjwwood): enable this deprecation after Galactic
// [[deprecated(
// "use 'void (std::shared_ptr<const MessageT>)' instead"
// )]]
[[deprecated("use 'void(std::shared_ptr<const MessageT>)' instead")]]
void
set_deprecated(std::function<void(std::shared_ptr<SetT>)> callback)
{
Expand All @@ -418,10 +415,9 @@ class AnySubscriptionCallback

/// Function for shared_ptr to non-const MessageT with MessageInfo, which is deprecated.
template<typename SetT>
// TODO(wjwwood): enable this deprecation after Galactic
// [[deprecated(
// "use 'void (std::shared_ptr<const MessageT>, const rclcpp::MessageInfo &)' instead"
// )]]
[[deprecated(
"use 'void(std::shared_ptr<const MessageT>, const rclcpp::MessageInfo &)' instead"
)]]
void
set_deprecated(std::function<void(std::shared_ptr<SetT>, const rclcpp::MessageInfo &)> callback)
{
Expand Down

0 comments on commit cd90003

Please sign in to comment.