mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -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:
@@ -159,7 +159,7 @@ std::vector<std::string> cmCommonTargetGenerator::GetLinkedTargetDirectories()
|
||||
std::string di = lg->GetCurrentBinaryDirectory();
|
||||
di += "/";
|
||||
di += lg->GetTargetDirectory(linkee);
|
||||
dirs.push_back(di);
|
||||
dirs.push_back(std::move(di));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user