diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-26 20:21:15 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-05-26 20:21:15 (GMT) |
commit | 27ead963052b4c3f4e40ea9e6141ba9902ad310a (patch) | |
tree | 69996681031307b34c930d51e0b3406fedf74236 /Source/cmExternalMakefileProjectGenerator.cxx | |
parent | 618fb23fc9838d344e2033c64bfc1a3a55bb7f61 (diff) | |
download | CMake-27ead963052b4c3f4e40ea9e6141ba9902ad310a.zip CMake-27ead963052b4c3f4e40ea9e6141ba9902ad310a.tar.gz CMake-27ead963052b4c3f4e40ea9e6141ba9902ad310a.tar.bz2 |
Remove unnecessary local copies.
Use clang-tidy's performance-unnecessary-copy-initialization checker.
After applying the fix-its (which turns the copies into const&), revise
the changes and see whether the copies can be removed entirely by using
the original instead.
Diffstat (limited to 'Source/cmExternalMakefileProjectGenerator.cxx')
-rw-r--r-- | Source/cmExternalMakefileProjectGenerator.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx index e3c8fa4..0e42d75 100644 --- a/Source/cmExternalMakefileProjectGenerator.cxx +++ b/Source/cmExternalMakefileProjectGenerator.cxx @@ -43,9 +43,8 @@ std::string cmExternalMakefileProjectGenerator::GetGlobalGeneratorName( return ""; } - std::string currentName = fullName; // if we get only the short name, take the first global generator as default - if (currentName == this->GetName()) { + if (fullName == this->GetName()) { return this->SupportedGlobalGenerators[0]; } @@ -53,7 +52,7 @@ std::string cmExternalMakefileProjectGenerator::GetGlobalGeneratorName( for (std::vector<std::string>::const_iterator it = this->SupportedGlobalGenerators.begin(); it != this->SupportedGlobalGenerators.end(); ++it) { - if (this->CreateFullGeneratorName(*it, this->GetName()) == currentName) { + if (this->CreateFullGeneratorName(*it, this->GetName()) == fullName) { return *it; } } |