diff options
author | Alexander Grund <Flamefire@users.noreply.github.com> | 2021-07-06 14:11:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-07-07 12:04:30 (GMT) |
commit | 5c02964aff0e126980fe327ad1601665d9fcabfe (patch) | |
tree | 3dd38c7f8e87d4c7d7f4ce66cb00f5876a282aa7 /Source | |
parent | 86595b300297c9572eea5710837f5bb12251c62f (diff) | |
download | CMake-5c02964aff0e126980fe327ad1601665d9fcabfe.zip CMake-5c02964aff0e126980fe327ad1601665d9fcabfe.tar.gz CMake-5c02964aff0e126980fe327ad1601665d9fcabfe.tar.bz2 |
cmLocalGenerator: Simplify CPATH lookup loop
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cfda21f..30df4c4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -107,10 +107,9 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, cmMakefile* makefile) { std::vector<std::string> cpath; cmSystemTools::GetPath(cpath, "CPATH"); - for (std::string& cp : cpath) { + for (std::string const& cp : cpath) { if (cmSystemTools::FileIsFullPath(cp)) { - cp = cmSystemTools::CollapseFullPath(cp); - this->EnvCPATH.emplace(std::move(cp)); + this->EnvCPATH.emplace(cmSystemTools::CollapseFullPath(cp)); } } } |