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/cmUnsetCommand.cxx | |
parent | d9f5d3c50fe376423382d6445f7fb2906a43469e (diff) | |
download | CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.zip CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.gz CMake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.bz2 |
Avoid else after return
Diffstat (limited to 'Source/cmUnsetCommand.cxx')
-rw-r--r-- | Source/cmUnsetCommand.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/cmUnsetCommand.cxx b/Source/cmUnsetCommand.cxx index 5bf137c..874015d 100644 --- a/Source/cmUnsetCommand.cxx +++ b/Source/cmUnsetCommand.cxx @@ -36,23 +36,21 @@ bool cmUnsetCommand::InitialPass(std::vector<std::string> const& args, return true; } // unset(VAR) - else if (args.size() == 1) { + if (args.size() == 1) { this->Makefile->RemoveDefinition(variable); return true; } // unset(VAR CACHE) - else if ((args.size() == 2) && (args[1] == "CACHE")) { + if ((args.size() == 2) && (args[1] == "CACHE")) { this->Makefile->RemoveCacheDefinition(variable); return true; } // unset(VAR PARENT_SCOPE) - else if ((args.size() == 2) && (args[1] == "PARENT_SCOPE")) { + if ((args.size() == 2) && (args[1] == "PARENT_SCOPE")) { this->Makefile->RaiseScope(variable, CM_NULLPTR); return true; } // ERROR: second argument isn't CACHE or PARENT_SCOPE - else { - this->SetError("called with an invalid second argument"); - return false; - } + this->SetError("called with an invalid second argument"); + return false; } |