summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallCommand.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 20:45:24 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 20:45:24 (GMT)
commit516f8edb2e061749c56b6f9a58332fbf59e45a1a (patch)
tree82ebe3f38b5248ef0b78586019ac1dca44ce2370 /Source/cmInstallCommand.cxx
parentd9f5d3c50fe376423382d6445f7fb2906a43469e (diff)
downloadCMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.zip
CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.gz
CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.bz2
Avoid else after return
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r--Source/cmInstallCommand.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index e464bce..f55fefb 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -71,19 +71,26 @@ bool cmInstallCommand::InitialPass(std::vector<std::string> const& args,
// Switch among the command modes.
if (args[0] == "SCRIPT") {
return this->HandleScriptMode(args);
- } else if (args[0] == "CODE") {
+ }
+ if (args[0] == "CODE") {
return this->HandleScriptMode(args);
- } else if (args[0] == "TARGETS") {
+ }
+ if (args[0] == "TARGETS") {
return this->HandleTargetsMode(args);
- } else if (args[0] == "FILES") {
+ }
+ if (args[0] == "FILES") {
return this->HandleFilesMode(args);
- } else if (args[0] == "PROGRAMS") {
+ }
+ if (args[0] == "PROGRAMS") {
return this->HandleFilesMode(args);
- } else if (args[0] == "DIRECTORY") {
+ }
+ if (args[0] == "DIRECTORY") {
return this->HandleDirectoryMode(args);
- } else if (args[0] == "EXPORT") {
+ }
+ if (args[0] == "EXPORT") {
return this->HandleExportMode(args);
- } else if (args[0] == "EXPORT_ANDROID_MK") {
+ }
+ if (args[0] == "EXPORT_ANDROID_MK") {
return this->HandleExportAndroidMKMode(args);
}
@@ -340,7 +347,8 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
<< "\" which is not an executable, library, or module.";
this->SetError(e.str());
return false;
- } else if (target->GetType() == cmState::OBJECT_LIBRARY) {
+ }
+ if (target->GetType() == cmState::OBJECT_LIBRARY) {
std::ostringstream e;
e << "TARGETS given OBJECT library \"" << (*targetIt)
<< "\" which may not be installed.";