File tree Expand file tree Collapse file tree 6 files changed +902
-355
lines changed
include/hardware_interface
ros2_control_test_assets/include/ros2_control_test_assets Expand file tree Collapse file tree 6 files changed +902
-355
lines changed Original file line number Diff line number Diff line change @@ -157,8 +157,7 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod
157157 {
158158 // return empty vector by default. For backward compatibility we check if all vectors is empty
159159 // and if so call on_export_state_interfaces()
160- std::vector<StateInterface> state_interfaces;
161- return state_interfaces;
160+ return {};
162161 }
163162
164163 std::vector<std::shared_ptr<StateInterface>> on_export_state_interfaces ()
@@ -195,8 +194,7 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod
195194 {
196195 // return empty vector by default. For backward compatibility we check if all vectors is empty
197196 // and if so call on_export_command_interfaces()
198- std::vector<CommandInterface> command_interfaces;
199- return command_interfaces;
197+ return {};
200198 }
201199
202200 std::vector<std::shared_ptr<CommandInterface>> on_export_command_interfaces ()
Original file line number Diff line number Diff line change @@ -93,8 +93,9 @@ class Handle
9393 const std::string & get_prefix_name () const { return prefix_name_; }
9494
9595 double get_value () const
96- { // BEGIN (Handle export change): for backward compatibility
97- // TODO(Manuel) return value_ if old functionality is removed
96+ {
97+ // BEGIN (Handle export change): for backward compatibility
98+ // TODO(Manuel) return value_ if old functionality is removed
9899 THROW_ON_NULLPTR (value_ptr_);
99100 return *value_ptr_;
100101 // END
Original file line number Diff line number Diff line change @@ -141,8 +141,7 @@ class SensorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
141141 {
142142 // return empty vector by default. For backward compatibility we check if all vectors is empty
143143 // and if so call on_export_state_interfaces()
144- std::vector<StateInterface> state_interfaces;
145- return state_interfaces;
144+ return {};
146145 }
147146
148147 std::vector<std::shared_ptr<StateInterface>> on_export_state_interfaces ()
Original file line number Diff line number Diff line change @@ -176,8 +176,7 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
176176 {
177177 // return empty vector by default. For backward compatibility we check if all vectors is empty
178178 // and if so call on_export_state_interfaces()
179- std::vector<StateInterface> state_interfaces;
180- return state_interfaces;
179+ return {};
181180 }
182181
183182 std::vector<std::shared_ptr<StateInterface>> on_export_state_interfaces ()
@@ -227,8 +226,7 @@ class SystemInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNodeI
227226 {
228227 // return empty vector by default. For backward compatibility we check if all vectors is empty
229228 // and if so call on_export_command_interfaces()
230- std::vector<CommandInterface> command_interfaces;
231- return command_interfaces;
229+ return {};
232230 }
233231
234232 std::vector<std::shared_ptr<CommandInterface>> on_export_command_interfaces ()
You can’t perform that action at this time.
0 commit comments