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/latency/lib/Responder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/utils/latency/lib') diff --git a/host/utils/latency/lib/Responder.cpp b/host/utils/latency/lib/Responder.cpp index c2f224d00..65c3e2941 100644 --- a/host/utils/latency/lib/Responder.cpp +++ b/host/utils/latency/lib/Responder.cpp @@ -664,7 +664,7 @@ bool Responder::handle_interactive_control() // print updated interactive control value void Responder::print_interactive_msg(std::string msg) { - if (msg != "") { + if (!msg.empty()) { // move cursor back to beginning of line int y, x; getyx(_window, y, x); @@ -1107,7 +1107,7 @@ void Responder::write_log_file() logs << boost::format("device=%s") % _usrp->get_mboard_name() << endl; logs << boost::format("device_args=%s") % _opt.device_args << endl; logs << boost::format("type=%s") % hw_info["type"] << endl; - if (hw_info.size() > 0) { + if (!hw_info.empty()) { logs << boost::format("usrp_addr=%s") % hw_info["usrp_addr"] << endl; logs << boost::format("usrp_name=%s") % hw_info["name"] << endl; logs << boost::format("serial=%s") % hw_info["serial"] << endl; -- cgit v1.2.3