Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use const auto & to iterate over parameters (#1593)
Clang is complaining about the looping variable being referenced as `const val` but should rather be `const ref`. ``` /Users/karsten/workspace/ros2/ros2_master/src/ros2/rclcpp/rclcpp/src/rclcpp/parameter_service.cpp:46:25: error: loop variable 'param' of type 'const rclcpp::Parameter' creates a copy from type 'const rclcpp::Parameter' [-Werror,-Wrange-loop-construct] for (const auto param : parameters) { ^ /Users/karsten/workspace/ros2/ros2_master/src/ros2/rclcpp/rclcpp/src/rclcpp/parameter_service.cpp:46:14: note: use reference type 'const rclcpp::Parameter &' to prevent copying for (const auto param : parameters) { ^~~~~~~~~~~~~~~~~~ & 1 error generated. ``` Signed-off-by: Karsten Knese <Karsten1987@users.noreply.github.com>
- Loading branch information