diff options
author | Brad King <brad.king@kitware.com> | 2016-08-23 13:00:00 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-08-23 13:00:00 (GMT) |
commit | 797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1 (patch) | |
tree | f5922b06caf987f6faff13f8c2ba8e0f164457f6 /Source/cmLocalGenerator.cxx | |
parent | 762131fe8d585ced6b259a451ccde8fded2a8ca4 (diff) | |
parent | 7b6349da4dc968691f1a374211fcc153c8b4f1c6 (diff) | |
download | CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.zip CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.gz CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.bz2 |
Merge topic 'else-after-return'
7b6349da CMake: don't use else after return
50ad1e0a CTest: don't use else after return
7f97a6c9 CPack: don't use else after return
4988b914 CursesDialog: don't use else after return
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index accce49..d8f6bdf 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -626,16 +626,14 @@ std::string cmLocalGenerator::ExpandRuleVariable( if (variable == "TARGET_VERSION_MAJOR") { if (replaceValues.TargetVersionMajor) { return replaceValues.TargetVersionMajor; - } else { - return "0"; } + return "0"; } if (variable == "TARGET_VERSION_MINOR") { if (replaceValues.TargetVersionMinor) { return replaceValues.TargetVersionMinor; - } else { - return "0"; } + return "0"; } if (replaceValues.Target) { if (variable == "TARGET_BASE") { @@ -644,9 +642,8 @@ std::string cmLocalGenerator::ExpandRuleVariable( std::string::size_type pos = targetBase.rfind('.'); if (pos != targetBase.npos) { return targetBase.substr(0, pos); - } else { - return targetBase; } + return targetBase; } } } @@ -813,9 +810,8 @@ const char* cmLocalGenerator::GetRuleLauncher(cmGeneratorTarget* target, { if (target) { return target->GetProperty(prop); - } else { - return this->Makefile->GetProperty(prop); } + return this->Makefile->GetProperty(prop); } void cmLocalGenerator::InsertRuleLauncher(std::string& s, @@ -2365,10 +2361,9 @@ static bool cmLocalGeneratorShortenObjectName(std::string& objName, // The object name is now short enough. return true; - } else { - // The object name could not be shortened enough. - return false; } + // The object name could not be shortened enough. + return false; } bool cmLocalGeneratorCheckObjectName(std::string& objName, @@ -2382,15 +2377,13 @@ bool cmLocalGeneratorCheckObjectName(std::string& objName, if (objName.size() > max_obj_len) { // The current object file name is too long. Try to shorten it. return cmLocalGeneratorShortenObjectName(objName, max_obj_len); - } else { - // The object file name is short enough. - return true; } - } else { - // The build directory in which the object will be stored is - // already too deep. - return false; + // The object file name is short enough. + return true; } + // The build directory in which the object will be stored is + // already too deep. + return false; } #endif |