mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
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.
This commit is contained in:
committed by
Brad King
parent
f1d27bf667
commit
eca523fbd4
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user