Skip to content

Commit 6f67f65

Browse files
Make reference_wrapper argument const
1 parent 7f6ebb9 commit 6f67f65

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,20 +309,17 @@ class JointTrajectoryController : public controller_interface::ControllerInterfa
309309
void resize_joint_trajectory_point_command(
310310
trajectory_msgs::msg::JointTrajectoryPoint & point, size_t size);
311311

312-
// TODO(anyone): can I here also use const on joint_interface since the reference_wrapper is not
313-
// changed, but its value only?
314-
// TODO(anyone): Use auto in parameter declaration with c++20
315-
316312
/**
317313
* @brief Assigns the values from a trajectory point interface to a joint interface.
318314
*
319315
* @tparam T The type of the joint interface.
320316
* @param[out] joint_interface The reference_wrapper to assign the values to
321317
* @param[in] trajectory_point_interface Containing the values to assign.
318+
* @todo: Use auto in parameter declaration with c++20
322319
*/
323320
template <typename T>
324321
void assign_interface_from_point(
325-
T & joint_interface, const std::vector<double> & trajectory_point_interface)
322+
const T & joint_interface, const std::vector<double> & trajectory_point_interface)
326323
{
327324
for (size_t index = 0; index < dof_; ++index)
328325
{

0 commit comments

Comments
 (0)