Skip to content

Apply clang-tidy suggestions to std::move certain variables #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading