diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2019-08-17 20:32:20 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2019-08-22 15:05:58 +0200 |
commit | b08d13aed2a7e7ffdee09833bb24db8ce92dce66 (patch) | |
tree | 4846eebe25b48c615cbe07d2a9f4e79d5e8ff72d /gnuradio-runtime/lib/prefs.cc | |
parent | c6cb3bbc35153a9635d69eddab0d252f7441b854 (diff) |
clang-tidy in gnuradio-runtime: use empty() instead of size()!=0
Diffstat (limited to 'gnuradio-runtime/lib/prefs.cc')
-rw-r--r-- | gnuradio-runtime/lib/prefs.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnuradio-runtime/lib/prefs.cc b/gnuradio-runtime/lib/prefs.cc index f59a2346f7..4173973c2e 100644 --- a/gnuradio-runtime/lib/prefs.cc +++ b/gnuradio-runtime/lib/prefs.cc @@ -243,7 +243,7 @@ bool prefs::get_bool(const std::string& section, { if (has_option(section, option)) { std::string str = get_string(section, option, ""); - if (str == "") { + if (str.empty()) { return default_val; } std::transform(str.begin(), str.end(), str.begin(), ::tolower); @@ -281,7 +281,7 @@ long prefs::get_long(const std::string& section, { if (has_option(section, option)) { std::string str = get_string(section, option, ""); - if (str == "") { + if (str.empty()) { return default_val; } std::stringstream sstr(str); @@ -316,7 +316,7 @@ double prefs::get_double(const std::string& section, { if (has_option(section, option)) { std::string str = get_string(section, option, ""); - if (str == "") { + if (str.empty()) { return default_val; } std::stringstream sstr(str); |