aboutsummaryrefslogtreecommitdiff
path: root/src/utility.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utility.h')
-rw-r--r--src/utility.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/utility.h b/src/utility.h
index 4e2e132e9..bcdcd1550 100644
--- a/src/utility.h
+++ b/src/utility.h
@@ -1009,10 +1009,11 @@ public:
// Asks if empty
bool getBoolAsk(std::string name, std::string question, bool def)
{
- std::string s = get(name);
- if(s != "")
- return is_yes(s);
+ // If it is in settings
+ if(m_settings.find(name))
+ return getBool(name);
+ std::string s;
char templine[10];
std::cout<<question<<" [y/N]: ";
std::cin.getline(templine, 10);
@@ -1039,10 +1040,11 @@ public:
u16 getU16Ask(std::string name, std::string question, u16 def)
{
- std::string s = get(name);
- if(s != "")
- return stoi(s, 0, 65535);
+ // If it is in settings
+ if(m_settings.find(name))
+ return getU16(name);
+ std::string s;
char templine[10];
std::cout<<question<<" ["<<def<<"]: ";
std::cin.getline(templine, 10);