Skip to content

Commit

Permalink
Apply clang-tidy suggestions to std::move certain variables
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass authored Jan 6, 2025
1 parent 0346fde commit c7f601e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct StackParams {

ParamListener(const std::shared_ptr<rclcpp::node_interfaces::NodeParametersInterface>& parameters_interface,
rclcpp::Logger logger, std::string const& prefix = "") {
logger_ = logger;
logger_ = std::move(logger);
prefix_ = prefix;
if (!prefix_.empty() && prefix_.back() != '.') {
prefix_ += ".";
Expand Down Expand Up @@ -210,7 +210,7 @@ struct StackParams {
private:
void update_internal_params(Params updated_params) {
std::lock_guard<std::mutex> lock(mutex_);
params_ = updated_params;
params_ = std::move(updated_params);
}

std::string prefix_;
Expand Down

0 comments on commit c7f601e

Please sign in to comment.