diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-05-21 21:36:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-05-22 16:52:12 (GMT) |
commit | eca523fbd40487a36f41a0e3088238770131b7ce (patch) | |
tree | b359b0e4f438347fa6f0da3d4a293e57d8ad2d6e | |
parent | f1d27bf667a8548121ed849cbb211eccf386f1bd (diff) | |
download | CMake-eca523fbd40487a36f41a0e3088238770131b7ce.zip CMake-eca523fbd40487a36f41a0e3088238770131b7ce.tar.gz CMake-eca523fbd40487a36f41a0e3088238770131b7ce.tar.bz2 |
wizard: simplify control flow
Checking if a byte is 0 before checking it for something else doesn't do
anything useful. Also one can be sure that it can't be anything wanted
if the value was set to 0 immediately before.
-rw-r--r-- | Source/cmakewizard.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Source/cmakewizard.cxx b/Source/cmakewizard.cxx index 8ac55d9..bac403a 100644 --- a/Source/cmakewizard.cxx +++ b/Source/cmakewizard.cxx @@ -71,12 +71,9 @@ bool cmakewizard::AskAdvanced() { buffer[0] = 0; } - if(buffer[0]) + else if(buffer[0] == 'y' || buffer[0] == 'Y') { - if(buffer[0] == 'y' || buffer[0] == 'Y') - { - return true; - } + return true; } return false; } |