diff options
author | Brad King <brad.king@kitware.com> | 2023-10-24 12:32:59 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-10-24 12:33:07 (GMT) |
commit | c54cb0000d10808575448382ecf5da589a323de9 (patch) | |
tree | d6aeac3d9cf24f4ce4b48700f7b4512a09ab9c50 /Source/CPack | |
parent | fd3c95140e8f9ad0a8e11cae19c212525ca8505d (diff) | |
parent | 9ca6dfc280b086fcf139f631f294281e234f5752 (diff) | |
download | CMake-c54cb0000d10808575448382ecf5da589a323de9.zip CMake-c54cb0000d10808575448382ecf5da589a323de9.tar.gz CMake-c54cb0000d10808575448382ecf5da589a323de9.tar.bz2 |
Merge topic 'vector-emplace-back'
9ca6dfc280 Source: Reduce vector entry allocations and copies
aaeb2e0aa8 cmLinkItemGraphVisitor: Remove unnecessary syntax
d1c1e95331 cmCPackInnoSetupGenerator: Reserve space to reduce allocations
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8891
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackInnoSetupGenerator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackInnoSetupGenerator.cxx b/Source/CPack/cmCPackInnoSetupGenerator.cxx index b8bf070..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 @@ -633,6 +634,7 @@ bool cmCPackInnoSetupGenerator::ProcessComponents() } else if (!component->InstallationTypes.empty()) { std::vector<std::string> installationTypes; + installationTypes.reserve(component->InstallationTypes.size()); for (cmCPackInstallationType* j : component->InstallationTypes) { installationTypes.push_back(j->Name); } |