From 16fbde3d7ee9e6d7ce19c789887eb4558118f59b Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Sun, 21 Apr 2024 08:05:43 +0200 Subject: [PATCH] return the proper const object of the pointer in the const method (#1494) --- .../include/controller_interface/controller_interface_base.hpp | 2 +- controller_interface/src/controller_interface_base.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controller_interface/include/controller_interface/controller_interface_base.hpp b/controller_interface/include/controller_interface/controller_interface_base.hpp index 182ffa7fec..1c09f71e98 100644 --- a/controller_interface/include/controller_interface/controller_interface_base.hpp +++ b/controller_interface/include/controller_interface/controller_interface_base.hpp @@ -145,7 +145,7 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy std::shared_ptr get_node(); CONTROLLER_INTERFACE_PUBLIC - std::shared_ptr get_node() const; + std::shared_ptr get_node() const; CONTROLLER_INTERFACE_PUBLIC const rclcpp_lifecycle::State & get_state() const; diff --git a/controller_interface/src/controller_interface_base.cpp b/controller_interface/src/controller_interface_base.cpp index e48e1d21b3..6b87ba5cda 100644 --- a/controller_interface/src/controller_interface_base.cpp +++ b/controller_interface/src/controller_interface_base.cpp @@ -121,7 +121,7 @@ std::shared_ptr ControllerInterfaceBase::get_no return node_; } -std::shared_ptr ControllerInterfaceBase::get_node() const +std::shared_ptr ControllerInterfaceBase::get_node() const { if (!node_.get()) {