Skip to content

Commit

Permalink
Apply clang-tidy suggestions to std::move certain variables (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass authored Jan 6, 2025
1 parent 787f7fb commit 75a8d4c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>

#include <fmt/core.h>
Expand Down Expand Up @@ -105,7 +106,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 +211,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 75a8d4c

Please # to comment.