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:
Rolf Eike Beer 2013-05-21 23:36:37 +02:00 committed by Brad King
parent f1d27bf667
commit eca523fbd4
1 changed files with 2 additions and 5 deletions

View File

@ -71,13 +71,10 @@ bool cmakewizard::AskAdvanced()
{
buffer[0] = 0;
}
if(buffer[0])
{
if(buffer[0] == 'y' || buffer[0] == 'Y')
else if(buffer[0] == 'y' || buffer[0] == 'Y')
{
return true;
}
}
return false;
}