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_image_loader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'host/utils/uhd_image_loader.cpp') diff --git a/host/utils/uhd_image_loader.cpp b/host/utils/uhd_image_loader.cpp index 87dc22b5c..36936fda1 100644 --- a/host/utils/uhd_image_loader.cpp +++ b/host/utils/uhd_image_loader.cpp @@ -95,7 +95,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) } // Clean up paths, if given - if (image_loader_args.firmware_path != "") { + if (!image_loader_args.firmware_path.empty()) { #ifndef UHD_PLATFORM_WIN32 if (image_loader_args.firmware_path.find("~") == 0) { image_loader_args.firmware_path.replace(0, 1, getenv("HOME")); @@ -104,7 +104,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) image_loader_args.firmware_path = fs::absolute(image_loader_args.firmware_path).string(); } - if (image_loader_args.fpga_path != "") { + if (!image_loader_args.fpga_path.empty()) { #ifndef UHD_PLATFORM_WIN32 if (image_loader_args.fpga_path.find("~") == 0) { image_loader_args.fpga_path.replace(0, 1, getenv("HOME")); @@ -112,7 +112,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) #endif /* UHD_PLATFORM_WIN32 */ image_loader_args.fpga_path = fs::absolute(image_loader_args.fpga_path).string(); } - if (image_loader_args.out_path != "") { + if (!image_loader_args.out_path.empty()) { #ifndef UHD_PLATFORM_WIN32 if (image_loader_args.out_path.find("~") == 0) { image_loader_args.out_path.replace(0, 1, getenv("HOME")); -- cgit v1.2.3