Skip to content

Commit 16fbde3

Browse files
authored
return the proper const object of the pointer in the const method (ros-controls#1494)
1 parent 47a7245 commit 16fbde3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

controller_interface/include/controller_interface/controller_interface_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class ControllerInterfaceBase : public rclcpp_lifecycle::node_interfaces::Lifecy
145145
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> get_node();
146146

147147
CONTROLLER_INTERFACE_PUBLIC
148-
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> get_node() const;
148+
std::shared_ptr<const rclcpp_lifecycle::LifecycleNode> get_node() const;
149149

150150
CONTROLLER_INTERFACE_PUBLIC
151151
const rclcpp_lifecycle::State & get_state() const;

controller_interface/src/controller_interface_base.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ std::shared_ptr<rclcpp_lifecycle::LifecycleNode> ControllerInterfaceBase::get_no
121121
return node_;
122122
}
123123

124-
std::shared_ptr<rclcpp_lifecycle::LifecycleNode> ControllerInterfaceBase::get_node() const
124+
std::shared_ptr<const rclcpp_lifecycle::LifecycleNode> ControllerInterfaceBase::get_node() const
125125
{
126126
if (!node_.get())
127127
{

0 commit comments

Comments
 (0)