summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-26 20:21:15 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-26 20:21:15 (GMT)
commit27ead963052b4c3f4e40ea9e6141ba9902ad310a (patch)
tree69996681031307b34c930d51e0b3406fedf74236 /Source/cmLocalGenerator.cxx
parent618fb23fc9838d344e2033c64bfc1a3a55bb7f61 (diff)
downloadCMake-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/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2de12ba..e91eb46 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1766,13 +1766,12 @@ static void AddVisibilityCompileOption(std::string& flags,
const std::string& lang,
std::string* warnCMP0063)
{
- std::string l(lang);
- std::string compileOption = "CMAKE_" + l + "_COMPILE_OPTIONS_VISIBILITY";
+ std::string compileOption = "CMAKE_" + lang + "_COMPILE_OPTIONS_VISIBILITY";
const char* opt = lg->GetMakefile()->GetDefinition(compileOption);
if (!opt) {
return;
}
- std::string flagDefine = l + "_VISIBILITY_PRESET";
+ std::string flagDefine = lang + "_VISIBILITY_PRESET";
const char* prop = target->GetProperty(flagDefine);
if (!prop) {