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/rfnoc/ddc_block_control.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'host/lib/rfnoc/ddc_block_control.cpp') diff --git a/host/lib/rfnoc/ddc_block_control.cpp b/host/lib/rfnoc/ddc_block_control.cpp index 99a00dd1d..91c53a5e9 100644 --- a/host/lib/rfnoc/ddc_block_control.cpp +++ b/host/lib/rfnoc/ddc_block_control.cpp @@ -106,7 +106,7 @@ public: double set_freq(const double freq, const size_t chan, - const boost::optional time) + const boost::optional time) override { // Store the current command time so we can restore it later auto prev_cmd_time = get_command_time(chan); @@ -119,12 +119,12 @@ public: return get_freq(chan); } - double get_freq(const size_t chan) const + double get_freq(const size_t chan) const override { return _freq.at(chan).get(); } - uhd::freq_range_t get_frequency_range(const size_t chan) const + uhd::freq_range_t get_frequency_range(const size_t chan) const override { const double input_rate = _samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0; @@ -132,22 +132,22 @@ public: return uhd::freq_range_t(-input_rate / 2, input_rate / 2); } - double get_input_rate(const size_t chan) const + double get_input_rate(const size_t chan) const override { return _samp_rate_in.at(chan).is_valid() ? _samp_rate_in.at(chan).get() : 1.0; } - void set_input_rate(const double rate, const size_t chan) + void set_input_rate(const double rate, const size_t chan) override { set_property("samp_rate", rate, {res_source_info::INPUT_EDGE, chan}); } - double get_output_rate(const size_t chan) const + double get_output_rate(const size_t chan) const override { return _samp_rate_out.at(chan).is_valid() ? _samp_rate_out.at(chan).get() : 1.0; } - uhd::meta_range_t get_output_rates(const size_t chan) const + uhd::meta_range_t get_output_rates(const size_t chan) const override { uhd::meta_range_t result; if (!_samp_rate_in.at(chan).is_valid()) { @@ -163,7 +163,7 @@ public: return result; } - double set_output_rate(const double rate, const size_t chan) + double set_output_rate(const double rate, const size_t chan) override { if (_samp_rate_in.at(chan).is_valid()) { const int coerced_decim = coerce_decim(get_input_rate(chan) / rate); @@ -184,7 +184,7 @@ public: // handler goes both ways. // This way, calling issue_stream_cmd() is the same as posting a message to // our output port. - void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port) + void issue_stream_cmd(const uhd::stream_cmd_t& stream_cmd, const size_t port) override { RFNOC_LOG_TRACE("issue_stream_cmd(stream_mode=" << char(stream_cmd.stream_mode) << ", port=" << port); -- cgit v1.2.3