diff options
author | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-14 10:35:25 -0800 |
---|---|---|
committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-16 11:40:23 -0800 |
commit | 967be2a4e82b1a125b26bb72a60318a4fb2b50c4 (patch) | |
tree | 8a24954b54d1546dc8049a17e485adb0a605f74f /host/utils/uhd_config_info.cpp | |
parent | aafe4e8b742a0e21d3818f21f34e3c8613132530 (diff) | |
download | uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.tar.gz uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.tar.bz2 uhd-967be2a4e82b1a125b26bb72a60318a4fb2b50c4.zip |
uhd: mpm: apply clang-format to all files
Applying formatting changes to all .cpp and .hpp files in the following
directories:
```
find host/examples/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/tests/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/neon/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/dboard/magnesium/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/device3/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/mpmd/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/lib/usrp/x300/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find host/utils/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
find mpm/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Also formatted host/include/, except Cpp03 was used as a the language
standard instead of Cpp11.
```
sed -i 's/ Cpp11/ Cpp03/g' .clang-format
find host/include/ -iname *.hpp -o -iname *.cpp | \
xargs clang-format -i -style=file
```
Formatting style was designated by the .clang-format file.
Diffstat (limited to 'host/utils/uhd_config_info.cpp')
-rw-r--r-- | host/utils/uhd_config_info.cpp | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/host/utils/uhd_config_info.cpp b/host/utils/uhd_config_info.cpp index 2c29af214..784ca9ff2 100644 --- a/host/utils/uhd_config_info.cpp +++ b/host/utils/uhd_config_info.cpp @@ -5,16 +5,16 @@ // #include <uhd/build_info.hpp> -#include <uhd/version.hpp> #include <uhd/utils/paths.hpp> #include <uhd/utils/safe_main.hpp> - +#include <uhd/version.hpp> #include <boost/format.hpp> #include <boost/program_options.hpp> namespace po = boost::program_options; -int UHD_SAFE_MAIN(int argc, char* argv[]) { +int UHD_SAFE_MAIN(int argc, char* argv[]) +{ // Program Options po::options_description desc("Allowed Options"); // clang-format off @@ -42,51 +42,53 @@ int UHD_SAFE_MAIN(int argc, char* argv[]) { po::notify(vm); // Print the help message - if(vm.count("help") > 0) { + if (vm.count("help") > 0) { std::cout << boost::format("UHD Config Info - %s") % desc << std::endl; return EXIT_FAILURE; } bool print_all = (vm.count("print-all") > 0); - if(vm.count("version") > 0 or print_all) { + if (vm.count("version") > 0 or print_all) { std::cout << "UHD " << uhd::get_version_string() << std::endl; } - if(vm.count("build-date") > 0 or print_all) { + if (vm.count("build-date") > 0 or print_all) { std::cout << "Build date: " << uhd::build_info::build_date() << std::endl; } - if(vm.count("c-compiler") > 0 or print_all) { + if (vm.count("c-compiler") > 0 or print_all) { std::cout << "C compiler: " << uhd::build_info::c_compiler() << std::endl; } - if(vm.count("cxx-compiler") > 0 or print_all) { + if (vm.count("cxx-compiler") > 0 or print_all) { std::cout << "C++ compiler: " << uhd::build_info::cxx_compiler() << std::endl; } - if(vm.count("c-flags") > 0 or print_all) { + if (vm.count("c-flags") > 0 or print_all) { std::cout << "C flags: " << uhd::build_info::c_flags() << std::endl; } - if(vm.count("cxx-flags") > 0 or print_all) { + if (vm.count("cxx-flags") > 0 or print_all) { std::cout << "C++ flags: " << uhd::build_info::cxx_flags() << std::endl; } - if(vm.count("enabled-components") > 0 or print_all) { - std::cout << "Enabled components: " << uhd::build_info::enabled_components() << std::endl; + if (vm.count("enabled-components") > 0 or print_all) { + std::cout << "Enabled components: " << uhd::build_info::enabled_components() + << std::endl; } - if(vm.count("install-prefix") > 0 or print_all) { + if (vm.count("install-prefix") > 0 or print_all) { std::cout << "Install prefix: " << uhd::build_info::install_prefix() << std::endl; } - if(vm.count("boost-version") > 0 or print_all) { + if (vm.count("boost-version") > 0 or print_all) { std::cout << "Boost version: " << uhd::build_info::boost_version() << std::endl; } - if(vm.count("libusb-version") > 0 or print_all) { + if (vm.count("libusb-version") > 0 or print_all) { std::string _libusb_version = uhd::build_info::libusb_version(); - std::cout << "Libusb version: " << (_libusb_version.empty() ? "N/A" : _libusb_version) << std::endl; + std::cout << "Libusb version: " + << (_libusb_version.empty() ? "N/A" : _libusb_version) << std::endl; } - if(vm.count("pkg-path") > 0 or print_all) { + if (vm.count("pkg-path") > 0 or print_all) { std::cout << "Package path: " << uhd::get_pkg_path() << std::endl; } - if(vm.count("images-dir") > 0 or print_all) { + if (vm.count("images-dir") > 0 or print_all) { std::cout << "Images directory: " << uhd::get_images_dir("") << std::endl; } - if(vm.count("abi-version") > 0 or print_all) { + if (vm.count("abi-version") > 0 or print_all) { std::cout << "ABI version string: " << uhd::get_abi_string() << std::endl; } |