diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-09-16 20:45:24 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-09-16 20:45:24 (GMT) |
commit | 516f8edb2e061749c56b6f9a58332fbf59e45a1a (patch) | |
tree | 82ebe3f38b5248ef0b78586019ac1dca44ce2370 /Source/cmInstallCommand.cxx | |
parent | d9f5d3c50fe376423382d6445f7fb2906a43469e (diff) | |
download | CMake-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.cxx | 24 |
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."; |