Skip to content

Commit 9bae856

Browse files
committed
fix(gateway): pass goal by const-reference in goal-callback lambda
Follow-up to the earlier clang-tidy fixup. After clang-format wrapped the goal-callback lambda onto its own line, clang-tidy re-evaluated the parameter list and re-flagged ``goal`` as a copied ``std::shared_ptr`` only used as a const reference. Switch the parameter to ``const ...&`` to match the rest of the action lambdas in the file.
1 parent 902bc7a commit 9bae856

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ros2_medkit_gateway/test/test_operation_handlers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class TestLongCalibrationActionServer : public rclcpp::Node {
110110
TestLongCalibrationActionServer() : rclcpp::Node("test_long_calibration_action", "/powertrain/engine") {
111111
action_server_ = rclcpp_action::create_server<Fibonacci>(
112112
this, "long_calibration",
113-
[this](const rclcpp_action::GoalUUID & uuid, std::shared_ptr<const Fibonacci::Goal> goal) {
113+
[this](const rclcpp_action::GoalUUID & uuid, const std::shared_ptr<const Fibonacci::Goal> & goal) {
114114
return handle_goal(uuid, goal);
115115
},
116116
[this](const std::shared_ptr<GoalHandleFibonacci> & goal_handle) {

0 commit comments

Comments
 (0)