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/b2xx_fx3_utils.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/b2xx_fx3_utils.cpp')
-rw-r--r-- | host/utils/b2xx_fx3_utils.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp index b75ff6960..65c4e52ca 100644 --- a/host/utils/b2xx_fx3_utils.cpp +++ b/host/utils/b2xx_fx3_utils.cpp @@ -173,7 +173,7 @@ uhd::transport::usb_device_handle::sptr open_device( std::vector<uhd::transport::usb_device_handle::vid_pid_pair_t> vid_pid_pair_list( 1, uhd::transport::usb_device_handle::vid_pid_pair_t(vid, pid)); handles = uhd::transport::usb_device_handle::get_device_list(vid_pid_pair_list); - if (handles.size() == 0) { + if (handles.empty()) { if (user_supplied) { std::cerr << (boost::format("Failed to open device with VID 0x%04x and " "PID 0x%04x - trying other known VID/PIDs") @@ -183,15 +183,14 @@ uhd::transport::usb_device_handle::sptr open_device( } // try known VID/PIDs next - for (size_t i = 0; handles.size() == 0 && i < known_vid_pid_vector.size(); - i++) { + for (size_t i = 0; handles.empty() && i < known_vid_pid_vector.size(); i++) { vp = known_vid_pid_vector[i]; handles = uhd::transport::usb_device_handle::get_device_list(vp.vid, vp.pid); } } - if (handles.size() > 0) { + if (!handles.empty()) { handle = handles[0]; std::cout << (boost::format("Device opened (VID=0x%04x,PID=0x%04x)") % vp.vid % vp.pid) |