summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-08-18 18:36:29 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-08-18 18:36:29 (GMT)
commit7b6349da4dc968691f1a374211fcc153c8b4f1c6 (patch)
treebb0fc76955ef3166c3416522fef009c9d65ab7f3 /Source/cmLocalGenerator.cxx
parent50ad1e0a144ae1f2267a4966789e5a16372f458e (diff)
downloadCMake-7b6349da4dc968691f1a374211fcc153c8b4f1c6.zip
CMake-7b6349da4dc968691f1a374211fcc153c8b4f1c6.tar.gz
CMake-7b6349da4dc968691f1a374211fcc153c8b4f1c6.tar.bz2
CMake: don't use else after return
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx29
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