summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-05-22 17:06:13 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-05-22 17:06:13 (GMT)
commit620599e25a2497723bae671b7a82c69252b1df85 (patch)
treef1da1021f80296c69dc05877903939d07adb1b42 /Source
parent4559d5cabb488759d5d24d3d8adffceaf0432886 (diff)
parenteca523fbd40487a36f41a0e3088238770131b7ce (diff)
downloadCMake-620599e25a2497723bae671b7a82c69252b1df85.zip
CMake-620599e25a2497723bae671b7a82c69252b1df85.tar.gz
CMake-620599e25a2497723bae671b7a82c69252b1df85.tar.bz2
Merge topic 'wizard-cleanup'
eca523f wizard: simplify control flow f1d27bf wizard: fix warnings
Diffstat (limited to 'Source')
-rw-r--r--Source/cmakewizard.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmakewizard.cxx b/Source/cmakewizard.cxx
index 749f669..bac403a 100644
--- a/Source/cmakewizard.cxx
+++ b/Source/cmakewizard.cxx
@@ -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,16 +67,13 @@ 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])
+ else if(buffer[0] == 'y' || buffer[0] == 'Y')
{
- if(buffer[0] == 'y' || buffer[0] == 'Y')
- {
- return true;
- }
+ return true;
}
return false;
}