From 107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 8 Jan 2021 09:33:36 +0100 Subject: 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 --- host/utils/uhd_usrp_probe.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'host/utils/uhd_usrp_probe.cpp') 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 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(path / "name").get()) << std::endl; std::vector 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 = -- cgit v1.2.3