mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Reduce allocation of temporary values on heap.
- Use `std::move` while inserting temporary results into vectors. - Change `push_back` to `emplace_back` where appropriate.
This commit is contained in:
@@ -30,8 +30,7 @@ bool cmInstallFilesCommand::InitialPass(std::vector<std::string> const& args,
|
||||
for (std::vector<std::string>::const_iterator s = args.begin() + 2;
|
||||
s != args.end(); ++s) {
|
||||
// Find the source location for each file listed.
|
||||
std::string f = this->FindInstallSource(s->c_str());
|
||||
this->Files.push_back(f);
|
||||
this->Files.push_back(this->FindInstallSource(s->c_str()));
|
||||
}
|
||||
this->CreateInstallGenerator();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user