summaryrefslogtreecommitdiffstats
path: root/Source/cmake.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/cmake.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/cmake.cxx')
-rw-r--r--Source/cmake.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 9e338e8..74c3f71 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1513,9 +1513,8 @@ int cmake::Run(const std::vector<std::string>& args, bool noconfigure)
if (this->GetWorkingMode() != NORMAL_MODE) {
if (cmSystemTools::GetErrorOccuredFlag()) {
return -1;
- } else {
- return 0;
}
+ return 0;
}
// If MAKEFLAGS are given in the environment, remove the environment
@@ -2063,11 +2062,10 @@ cmInstalledFile* cmake::GetOrCreateInstalledFile(cmMakefile* mf,
if (i != this->InstalledFiles.end()) {
cmInstalledFile& file = i->second;
return &file;
- } else {
- cmInstalledFile& file = this->InstalledFiles[name];
- file.SetName(mf, name);
- return &file;
}
+ cmInstalledFile& file = this->InstalledFiles[name];
+ file.SetName(mf, name);
+ return &file;
}
cmInstalledFile const* cmake::GetInstalledFile(const std::string& name) const
@@ -2078,9 +2076,8 @@ cmInstalledFile const* cmake::GetInstalledFile(const std::string& name) const
if (i != this->InstalledFiles.end()) {
cmInstalledFile const& file = i->second;
return &file;
- } else {
- return CM_NULLPTR;
}
+ return CM_NULLPTR;
}
int cmake::GetSystemInformation(std::vector<std::string>& args)
@@ -2253,11 +2250,10 @@ static bool cmakeCheckStampFile(const char* stampName)
std::cout << "CMake does not need to re-run because " << stampName
<< " is up-to-date.\n";
return true;
- } else {
- cmSystemTools::RemoveFile(stampTemp);
- cmSystemTools::Error("Cannot restore timestamp ", stampName);
- return false;
}
+ cmSystemTools::RemoveFile(stampTemp);
+ cmSystemTools::Error("Cannot restore timestamp ", stampName);
+ return false;
}
static bool cmakeCheckStampList(const char* stampList)