diff options
author | Rose <83477269+AtariDreams@users.noreply.github.com> | 2023-10-16 23:43:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-10-23 15:18:32 (GMT) |
commit | 9ca6dfc280b086fcf139f631f294281e234f5752 (patch) | |
tree | a5c60e2d93b8c4ad6a56eb28a0aeabb8bca404cf /Source/CTest/cmCTestGIT.cxx | |
parent | aaeb2e0aa868af3cfe927e1ff8c79faa8bdcf28f (diff) | |
download | CMake-9ca6dfc280b086fcf139f631f294281e234f5752.zip CMake-9ca6dfc280b086fcf139f631f294281e234f5752.tar.gz CMake-9ca6dfc280b086fcf139f631f294281e234f5752.tar.bz2 |
Source: Reduce vector entry allocations and copies
Prefer `emplace_back` over `push_back`.
Diffstat (limited to 'Source/CTest/cmCTestGIT.cxx')
-rw-r--r-- | Source/CTest/cmCTestGIT.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx index ca8659e..984c837 100644 --- a/Source/CTest/cmCTestGIT.cxx +++ b/Source/CTest/cmCTestGIT.cxx @@ -159,7 +159,7 @@ bool cmCTestGIT::UpdateByFetchAndReset() // Use "git fetch" to get remote commits. std::vector<std::string> git_fetch; git_fetch.push_back(git); - git_fetch.push_back("fetch"); + git_fetch.emplace_back("fetch"); // Add user-specified update options. std::string opts = this->CTest->GetCTestConfiguration("UpdateOptions"); |