summaryrefslogtreecommitdiff
path: root/Source/cmCMakePolicyCommand.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 22:45:24 +0200
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-16 22:45:24 +0200
commit516f8edb2e061749c56b6f9a58332fbf59e45a1a (patch)
tree82ebe3f38b5248ef0b78586019ac1dca44ce2370 /Source/cmCMakePolicyCommand.cxx
parentd9f5d3c50fe376423382d6445f7fb2906a43469e (diff)
downloadcmake-516f8edb2e061749c56b6f9a58332fbf59e45a1a.tar.gz
Avoid else after return
Diffstat (limited to 'Source/cmCMakePolicyCommand.cxx')
-rw-r--r--Source/cmCMakePolicyCommand.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx
index 03c4a37109..d29e2081ac 100644
--- a/Source/cmCMakePolicyCommand.cxx
+++ b/Source/cmCMakePolicyCommand.cxx
@@ -24,23 +24,27 @@ bool cmCMakePolicyCommand::InitialPass(std::vector<std::string> const& args,
if (args[0] == "SET") {
return this->HandleSetMode(args);
- } else if (args[0] == "GET") {
+ }
+ if (args[0] == "GET") {
return this->HandleGetMode(args);
- } else if (args[0] == "PUSH") {
+ }
+ if (args[0] == "PUSH") {
if (args.size() > 1) {
this->SetError("PUSH may not be given additional arguments.");
return false;
}
this->Makefile->PushPolicy();
return true;
- } else if (args[0] == "POP") {
+ }
+ if (args[0] == "POP") {
if (args.size() > 1) {
this->SetError("POP may not be given additional arguments.");
return false;
}
this->Makefile->PopPolicy();
return true;
- } else if (args[0] == "VERSION") {
+ }
+ if (args[0] == "VERSION") {
return this->HandleVersionMode(args);
}
@@ -148,7 +152,8 @@ bool cmCMakePolicyCommand::HandleVersionMode(
if (args.size() <= 1) {
this->SetError("VERSION not given an argument");
return false;
- } else if (args.size() >= 3) {
+ }
+ if (args.size() >= 3) {
this->SetError("VERSION given too many arguments");
return false;
}