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/CPack | |
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/CPack')
-rw-r--r-- | Source/CPack/cmCPackInnoSetupGenerator.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackInnoSetupGenerator.cxx b/Source/CPack/cmCPackInnoSetupGenerator.cxx index 429a281..bf90b06 100644 --- a/Source/CPack/cmCPackInnoSetupGenerator.cxx +++ b/Source/CPack/cmCPackInnoSetupGenerator.cxx @@ -579,8 +579,9 @@ bool cmCPackInnoSetupGenerator::ProcessFiles() bool cmCPackInnoSetupGenerator::ProcessComponents() { - codeIncludes.push_back("{ The following lines are required by CPack because " - "this script uses components }"); + codeIncludes.emplace_back( + "{ The following lines are required by CPack because " + "this script uses components }"); // Installation types std::vector<cmCPackInstallationType*> types(InstallationTypes.size()); @@ -607,7 +608,7 @@ bool cmCPackInnoSetupGenerator::ProcessComponents() "\"{code:CPackGetCustomInstallationMessage}\""; customTypeParams["Flags"] = "iscustom"; - allTypes.push_back("custom"); + allTypes.emplace_back("custom"); typeInstructions.push_back(ISKeyValueLine(customTypeParams)); // Components |