Skip to content

Commit

Permalink
SubscriptionBase::get_subscription_handle() const should return a s…
Browse files Browse the repository at this point in the history
…hared pointer to const value (ros2#1140)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
  • Loading branch information
ivanpauno authored and Joshua Hampp committed Jul 7, 2020
1 parent 580892b commit e7763e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rclcpp/include/rclcpp/subscription_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SubscriptionBase : public std::enable_shared_from_this<SubscriptionBase>
get_subscription_handle();

RCLCPP_PUBLIC
const std::shared_ptr<rcl_subscription_t>
std::shared_ptr<const rcl_subscription_t>
get_subscription_handle() const;

/// Get all the QoS event handlers associated with this subscription.
Expand Down
2 changes: 1 addition & 1 deletion rclcpp/src/rclcpp/subscription_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ SubscriptionBase::get_subscription_handle()
return subscription_handle_;
}

const std::shared_ptr<rcl_subscription_t>
std::shared_ptr<const rcl_subscription_t>
SubscriptionBase::get_subscription_handle() const
{
return subscription_handle_;
Expand Down

0 comments on commit e7763e9

Please sign in to comment.