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_;