From daa4b4d5c6d7204a03b5ce2044e073b3cebffb08 Mon Sep 17 00:00:00 2001 From: Ivan Santiago Paunovic Date: Thu, 28 May 2020 10:10:39 -0300 Subject: [PATCH] `SubscriptionBase::get_subscription_handle() const` should return a shared pointer to const value Signed-off-by: Ivan Santiago Paunovic --- rclcpp/include/rclcpp/subscription_base.hpp | 2 +- rclcpp/src/rclcpp/subscription_base.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rclcpp/include/rclcpp/subscription_base.hpp b/rclcpp/include/rclcpp/subscription_base.hpp index 84bb127e60..d2a4aa936e 100644 --- a/rclcpp/include/rclcpp/subscription_base.hpp +++ b/rclcpp/include/rclcpp/subscription_base.hpp @@ -91,7 +91,7 @@ class SubscriptionBase : public std::enable_shared_from_this get_subscription_handle(); RCLCPP_PUBLIC - const std::shared_ptr + std::shared_ptr get_subscription_handle() const; /// Get all the QoS event handlers associated with this subscription. diff --git a/rclcpp/src/rclcpp/subscription_base.cpp b/rclcpp/src/rclcpp/subscription_base.cpp index dc8c559ffa..37726031b4 100644 --- a/rclcpp/src/rclcpp/subscription_base.cpp +++ b/rclcpp/src/rclcpp/subscription_base.cpp @@ -109,7 +109,7 @@ SubscriptionBase::get_subscription_handle() return subscription_handle_; } -const std::shared_ptr +std::shared_ptr SubscriptionBase::get_subscription_handle() const { return subscription_handle_;