diff options
author | Brad King <brad.king@kitware.com> | 2018-01-29 13:05:17 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-29 13:05:27 (GMT) |
commit | 92cd3d06772ada13935790d66927ab4663c7d628 (patch) | |
tree | 2550a2ad9003b47f9029c186aeabdfd6521bc615 /Source/cmLocalGenerator.cxx | |
parent | 18153217e27d2cf560d874313557ec9fa2bcffdb (diff) | |
parent | c85bb007df37aad9f20355cdf4d7ca9af562cb20 (diff) | |
download | CMake-92cd3d06772ada13935790d66927ab4663c7d628.zip CMake-92cd3d06772ada13935790d66927ab4663c7d628.tar.gz CMake-92cd3d06772ada13935790d66927ab4663c7d628.tar.bz2 |
Merge topic 'reduce-temporaries'
c85bb007 Reduce allocation of temporary values on heap.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1698
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 86b16f8..859aa44 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -207,7 +207,7 @@ void cmLocalGenerator::TraceDependencies() std::vector<std::string> configs; this->Makefile->GetConfigurations(configs); if (configs.empty()) { - configs.push_back(""); + configs.emplace_back(); } for (std::string const& c : configs) { this->GlobalGenerator->CreateEvaluationSourceFiles(c); @@ -602,7 +602,7 @@ void cmLocalGenerator::ComputeTargetManifest() std::vector<std::string> configNames; this->Makefile->GetConfigurations(configNames); if (configNames.empty()) { - configNames.push_back(""); + configNames.emplace_back(); } // Add our targets to the manifest for each configuration. @@ -623,7 +623,7 @@ bool cmLocalGenerator::ComputeTargetCompileFeatures() std::vector<std::string> configNames; this->Makefile->GetConfigurations(configNames); if (configNames.empty()) { - configNames.push_back(""); + configNames.emplace_back(); } // Process compile features of all targets. @@ -906,7 +906,7 @@ void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, for (std::string const& i : impDirVec) { std::string d = rootPath + i; cmSystemTools::ConvertToUnixSlashes(d); - emitted.insert(d); + emitted.insert(std::move(d)); if (!stripImplicitInclDirs) { implicitDirs.push_back(i); } @@ -2002,7 +2002,7 @@ void cmLocalGenerator::AppendIncludeDirectories( } if (uniqueIncludes.insert(inc).second) { - includes.push_back(inc); + includes.push_back(std::move(inc)); } } } |