Use std::move() for rvalue-reference setters and ctors
Also update an rvalue reference to lvalue reference where it's
unnecessary to make it clearer.
Test: Build and boot cuttlefish.
Change-Id: Ib799666ab075523e6446f34c7da2b1eb311f98ab
diff --git a/linker/linker_config.h b/linker/linker_config.h
index a318bba..75d9378 100644
--- a/linker/linker_config.h
+++ b/linker/linker_config.h
@@ -114,15 +114,15 @@
}
void set_search_paths(std::vector<std::string>&& search_paths) {
- search_paths_ = search_paths;
+ search_paths_ = std::move(search_paths);
}
void set_permitted_paths(std::vector<std::string>&& permitted_paths) {
- permitted_paths_ = permitted_paths;
+ permitted_paths_ = std::move(permitted_paths);
}
void set_whitelisted_libs(std::vector<std::string>&& whitelisted_libs) {
- whitelisted_libs_ = whitelisted_libs;
+ whitelisted_libs_ = std::move(whitelisted_libs);
}
private:
const std::string name_;