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/common/ad936x_manager.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'host/lib/usrp/common/ad936x_manager.cpp') diff --git a/host/lib/usrp/common/ad936x_manager.cpp b/host/lib/usrp/common/ad936x_manager.cpp index 9646f0427..31e823d32 100644 --- a/host/lib/usrp/common/ad936x_manager.cpp +++ b/host/lib/usrp/common/ad936x_manager.cpp @@ -57,7 +57,7 @@ public: /************************************************************************ * API Calls ***********************************************************************/ - void init_codec() + void init_codec() override { for (const std::string& rx_fe : _rx_frontends) { _codec_ctrl->set_gain(rx_fe, DEFAULT_GAIN); @@ -86,7 +86,7 @@ public: // worst case conditions to stress the interface. // void loopback_self_test(std::function poker_functor, - std::function peeker_functor) + std::function peeker_functor) override { // Put AD936x in loopback mode _codec_ctrl->data_port_loopback(true); @@ -135,7 +135,7 @@ public: } - double get_auto_tick_rate(const double lcm_rate, size_t num_chans) + double get_auto_tick_rate(const double lcm_rate, size_t num_chans) override { UHD_ASSERT_THROW(num_chans >= 1 and num_chans <= _n_frontends); const uhd::meta_range_t rate_range = _codec_ctrl->get_clock_rate_range(); @@ -186,7 +186,7 @@ public: return new_rate; } - bool check_bandwidth(double rate, const std::string dir) + bool check_bandwidth(double rate, const std::string dir) override { double bw = _bw[dir == "Rx" ? "RX1" : "TX1"]; if (bw == 0.) // 0 indicates bandwidth is default value. @@ -208,8 +208,9 @@ public: return (rate <= bw); } - void populate_frontend_subtree( - uhd::property_tree::sptr subtree, const std::string& key, uhd::direction_t dir) + void populate_frontend_subtree(uhd::property_tree::sptr subtree, + const std::string& key, + uhd::direction_t dir) override { subtree->create("name").set("FE-" + key); -- cgit v1.2.3