summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/prefs.cc
diff options
context:
space:
mode:
authorMarcus Müller <mmueller@gnuradio.org>2019-08-17 20:32:20 +0200
committerMarcus Müller <marcus@hostalia.de>2019-08-22 15:05:58 +0200
commitb08d13aed2a7e7ffdee09833bb24db8ce92dce66 (patch)
tree4846eebe25b48c615cbe07d2a9f4e79d5e8ff72d /gnuradio-runtime/lib/prefs.cc
parentc6cb3bbc35153a9635d69eddab0d252f7441b854 (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.cc6
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);