From 75a8d4c71c0f3e67dd96527ad29fb77e1e58065f Mon Sep 17 00:00:00 2001 From: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> Date: Mon, 6 Jan 2025 10:06:50 -0500 Subject: [PATCH] Apply clang-tidy suggestions to `std::move` certain variables (#228) --- .../jinja_templates/cpp/parameter_library_header | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generate_parameter_library_py/generate_parameter_library_py/jinja_templates/cpp/parameter_library_header b/generate_parameter_library_py/generate_parameter_library_py/jinja_templates/cpp/parameter_library_header index aa315e0..179d506 100644 --- a/generate_parameter_library_py/generate_parameter_library_py/jinja_templates/cpp/parameter_library_header +++ b/generate_parameter_library_py/generate_parameter_library_py/jinja_templates/cpp/parameter_library_header @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -105,7 +106,7 @@ struct StackParams { ParamListener(const std::shared_ptr& parameters_interface, rclcpp::Logger logger, std::string const& prefix = "") { - logger_ = logger; + logger_ = std::move(logger); prefix_ = prefix; if (!prefix_.empty() && prefix_.back() != '.') { prefix_ += "."; @@ -210,7 +211,7 @@ struct StackParams { private: void update_internal_params(Params updated_params) { std::lock_guard lock(mutex_); - params_ = updated_params; + params_ = std::move(updated_params); } std::string prefix_;