diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-01-08 09:33:36 +0100 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-03-04 08:07:26 -0600 |
commit | 107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch) | |
tree | fdeaad56030a02948377c45838dab97beb7a5c84 /host/utils/uhd_usrp_probe.cpp | |
parent | 7d5e48032baa62cbe7467833b9e057900602f4b9 (diff) | |
download | uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2 uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.zip |
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree
using:
$ find . -name "*.cpp" | sort -u | xargs \
--max-procs 8 --max-args 1 clang-tidy --format-style=file \
--fix -p /path/to/compile_commands.json
Diffstat (limited to 'host/utils/uhd_usrp_probe.cpp')
-rw-r--r-- | host/utils/uhd_usrp_probe.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp index 24b82543c..50eabc55b 100644 --- a/host/utils/uhd_usrp_probe.cpp +++ b/host/utils/uhd_usrp_probe.cpp @@ -39,7 +39,7 @@ static std::string make_border(const std::string& text) boost::split(lines, text, boost::is_any_of("\n")); while (lines.back().empty()) lines.pop_back(); // strip trailing newlines - if (lines.size()) + if (!lines.empty()) lines[0] = " " + lines[0]; // indent the title line for (const std::string& line : lines) { ss << boost::format("| %s") % line << std::endl; @@ -99,7 +99,7 @@ static std::string get_frontend_pp_string( << std::endl; std::vector<std::string> gain_names = tree->list(path / "gains"); - if (gain_names.size() == 0) + if (gain_names.empty()) ss << "Gain Elements: None" << std::endl; for (const std::string& name : gain_names) { meta_range_t gain_range = @@ -139,7 +139,7 @@ static std::string get_codec_pp_string( ss << boost::format("Name: %s") % (tree->access<std::string>(path / "name").get()) << std::endl; std::vector<std::string> gain_names = tree->list(path / "gains"); - if (gain_names.size() == 0) + if (gain_names.empty()) ss << "Gain Elements: None" << std::endl; for (const std::string& name : gain_names) { meta_range_t gain_range = |