summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-23 13:00:00 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-08-23 13:00:00 (GMT)
commit797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1 (patch)
treef5922b06caf987f6faff13f8c2ba8e0f164457f6 /Source/cmakemain.cxx
parent762131fe8d585ced6b259a451ccde8fded2a8ca4 (diff)
parent7b6349da4dc968691f1a374211fcc153c8b4f1c6 (diff)
downloadCMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.zip
CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.gz
CMake-797f7ad87d6f1b6dd7cbbb553d5525ac8ee390f1.tar.bz2
Merge topic 'else-after-return'
7b6349da CMake: don't use else after return 50ad1e0a CTest: don't use else after return 7f97a6c9 CPack: don't use else after return 4988b914 CursesDialog: don't use else after return
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 8731b2b..1505d00 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -163,7 +163,8 @@ int main(int ac, char const* const* av)
if (ac > 1) {
if (strcmp(av[1], "--build") == 0) {
return do_build(ac, av);
- } else if (strcmp(av[1], "-E") == 0) {
+ }
+ if (strcmp(av[1], "-E") == 0) {
return do_command(ac, av);
}
}
@@ -237,7 +238,8 @@ int do_cmake(int ac, char const* const* av)
"Use cmake-gui or ccmake for an interactive dialog.\n";
/* clang-format on */
return 1;
- } else if (strcmp(av[i], "--system-information") == 0) {
+ }
+ if (strcmp(av[i], "--system-information") == 0) {
sysinfo = true;
} else if (strcmp(av[i], "-N") == 0) {
view_only = true;
@@ -313,9 +315,8 @@ int do_cmake(int ac, char const* const* av)
// interpret negative return values as errors.
if (res != 0) {
return 1;
- } else {
- return 0;
}
+ return 0;
}
static int do_build(int ac, char const* const* av)