summaryrefslogtreecommitdiff
path: root/gnuradio-core
diff options
context:
space:
mode:
authorTom Rondeau2013-02-16 16:03:10 -0500
committerTom Rondeau2013-02-16 16:03:10 -0500
commitedb256b22b6d0233ce274526d28ac79afbceab73 (patch)
tree866f4ef386ff98f11e999fa31c17756353855a5d /gnuradio-core
parent4f2481e1310dd9e936ed110d60679e71ca2059a8 (diff)
downloadgnuradio-edb256b22b6d0233ce274526d28ac79afbceab73.tar.gz
gnuradio-edb256b22b6d0233ce274526d28ac79afbceab73.tar.bz2
gnuradio-edb256b22b6d0233ce274526d28ac79afbceab73.zip
core: prefs of true/on/1 and false/off/0 are translated to bools.
Diffstat (limited to 'gnuradio-core')
-rw-r--r--gnuradio-core/src/lib/general/gr_prefs.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-core/src/lib/general/gr_prefs.cc b/gnuradio-core/src/lib/general/gr_prefs.cc
index 4a9e10f2d..c192e25be 100644
--- a/gnuradio-core/src/lib/general/gr_prefs.cc
+++ b/gnuradio-core/src/lib/general/gr_prefs.cc
@@ -166,9 +166,9 @@ gr_prefs::get_bool(const std::string section, const std::string option, bool def
return default_val;
}
std::transform(str.begin(), str.end(), str.begin(), ::tolower);
- if(str == "true")
+ if((str == "true") || (str == "on") || (str == "1"))
return true;
- else if(str == "false")
+ else if((str == "false") || (str == "off") || (str == "0"))
return false;
else
return default_val;