diff options
author | Tom Rondeau | 2013-02-16 16:03:10 -0500 |
---|---|---|
committer | Tom Rondeau | 2013-02-16 16:03:10 -0500 |
commit | edb256b22b6d0233ce274526d28ac79afbceab73 (patch) | |
tree | 866f4ef386ff98f11e999fa31c17756353855a5d /gnuradio-core | |
parent | 4f2481e1310dd9e936ed110d60679e71ca2059a8 (diff) | |
download | gnuradio-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.cc | 4 |
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; |