From c7f601e37f4d89f49901faa2b7052a70166ec093 Mon Sep 17 00:00:00 2001 From: Sebastian Castro <4603398+sea-bass@users.noreply.github.com> Date: Mon, 6 Jan 2025 09:37:58 -0500 Subject: [PATCH] Apply clang-tidy suggestions to `std::move` certain variables --- .../jinja_templates/cpp/parameter_library_header | 4 ++-- 1 file changed, 2 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..801e7c8 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 @@ -105,7 +105,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 +210,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_;