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/examples/gpio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'host/examples/gpio.cpp') diff --git a/host/examples/gpio.cpp b/host/examples/gpio.cpp index 12bcd26f7..d4a188c66 100644 --- a/host/examples/gpio.cpp +++ b/host/examples/gpio.cpp @@ -214,9 +214,9 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) std::cout << "Using GPIO bank: " << gpio << std::endl; // subdev spec - if (tx_subdev_spec != "") + if (!tx_subdev_spec.empty()) usrp->set_tx_subdev_spec(tx_subdev_spec); - if (rx_subdev_spec != "") + if (!rx_subdev_spec.empty()) usrp->set_rx_subdev_spec(rx_subdev_spec); std::cout << boost::format(" rx_subdev_spec: %s") % usrp->get_rx_subdev_spec(0).to_string() -- cgit v1.2.3