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/lib/usrp/b200/b200_image_loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/b200/b200_image_loader.cpp') diff --git a/host/lib/usrp/b200/b200_image_loader.cpp b/host/lib/usrp/b200/b200_image_loader.cpp index 25bf7ce2f..675819018 100644 --- a/host/lib/usrp/b200/b200_image_loader.cpp +++ b/host/lib/usrp/b200/b200_image_loader.cpp @@ -34,7 +34,7 @@ static b200_iface::sptr get_b200_iface( b200_iface::sptr iface; mboard_eeprom_t eeprom; // Internal use - if (dev_handles.size() > 0) { + if (!dev_handles.empty()) { for (usb_device_handle::sptr dev_handle : dev_handles) { if (dev_handle->firmware_loaded()) { iface = b200_iface::make(usb_control::make(dev_handle, 0)); @@ -104,7 +104,7 @@ static bool b200_image_loader(const image_loader::image_loader_args_t& image_loa return false; // No initialized B2x0 found std::string fpga_path; - if (image_loader_args.fpga_path == "") { + if (image_loader_args.fpga_path.empty()) { /* * Normally, we can auto-generate the FPGA filename from what's in the EEPROM, * but if the applicable value is not in the EEPROM, the user must give a specific -- cgit v1.2.3