From b08d13aed2a7e7ffdee09833bb24db8ce92dce66 Mon Sep 17 00:00:00 2001 From: Marcus Müller <mmueller@gnuradio.org> Date: Sat, 17 Aug 2019 20:32:20 +0200 Subject: clang-tidy in gnuradio-runtime: use empty() instead of size()!=0 --- gnuradio-runtime/lib/prefs.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnuradio-runtime/lib/prefs.cc') 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); -- cgit v1.2.3