Merge topic 'wizard-cleanup'
eca523f
wizard: simplify control flowf1d27bf
wizard: fix warnings
This commit is contained in:
commit
620599e25a
|
@ -28,7 +28,7 @@ void cmakewizard::AskUser(const char* key,
|
|||
printf("Current Value: %s\n", iter.GetValue());
|
||||
printf("New Value (Enter to keep current value): ");
|
||||
char buffer[4096];
|
||||
if(!fgets(buffer, sizeof(buffer)-1, stdin))
|
||||
if(!fgets(buffer, static_cast<int>(sizeof(buffer) - 1), stdin))
|
||||
{
|
||||
buffer[0] = 0;
|
||||
}
|
||||
|
@ -67,17 +67,14 @@ bool cmakewizard::AskAdvanced()
|
|||
{
|
||||
printf("Would you like to see advanced options? [No]:");
|
||||
char buffer[4096];
|
||||
if(!fgets(buffer, sizeof(buffer)-1, stdin))
|
||||
if(!fgets(buffer, static_cast<int>(sizeof(buffer) - 1), stdin))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue