diff options
author | Marcus Müller <mmueller@gnuradio.org> | 2020-10-30 18:22:33 +0100 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2020-11-03 14:07:23 -0500 |
commit | 0ddc7dbc95ca6fb4c4a62a3c027104d6dd71fc3b (patch) | |
tree | b454053fdc123711f3011b8a703de38e1d783ba3 /gr-digital/include | |
parent | 1cfd6287635e339b313e1826fdfda23f474c91c8 (diff) |
modernization: `override` instead of virtual in all compilation units
Diffstat (limited to 'gr-digital/include')
13 files changed, 98 insertions, 97 deletions
diff --git a/gr-digital/include/gnuradio/digital/adaptive_algorithm_cma.h b/gr-digital/include/gnuradio/digital/adaptive_algorithm_cma.h index 0544468ea4..5c58255744 100644 --- a/gr-digital/include/gnuradio/digital/adaptive_algorithm_cma.h +++ b/gr-digital/include/gnuradio/digital/adaptive_algorithm_cma.h @@ -83,7 +83,7 @@ public: return conj(conj(tap) - d_step_size * u_n * conj(err)); } - ~adaptive_algorithm_cma() {} + ~adaptive_algorithm_cma() override {} }; } // namespace digital diff --git a/gr-digital/include/gnuradio/digital/adaptive_algorithm_lms.h b/gr-digital/include/gnuradio/digital/adaptive_algorithm_lms.h index 2be52b9fba..ee82190ef8 100644 --- a/gr-digital/include/gnuradio/digital/adaptive_algorithm_lms.h +++ b/gr-digital/include/gnuradio/digital/adaptive_algorithm_lms.h @@ -38,7 +38,7 @@ public: return adaptive_algorithm_lms::sptr(new adaptive_algorithm_lms(cons, step_size)); } - ~adaptive_algorithm_lms() {} + ~adaptive_algorithm_lms() override {} void update_taps(gr_complex* taps, const gr_complex* in, diff --git a/gr-digital/include/gnuradio/digital/adaptive_algorithm_nlms.h b/gr-digital/include/gnuradio/digital/adaptive_algorithm_nlms.h index 5c8145afa8..f5f1724a94 100644 --- a/gr-digital/include/gnuradio/digital/adaptive_algorithm_nlms.h +++ b/gr-digital/include/gnuradio/digital/adaptive_algorithm_nlms.h @@ -63,7 +63,7 @@ public: } } - ~adaptive_algorithm_nlms() {} + ~adaptive_algorithm_nlms() override {} void initialize_taps(std::vector<gr_complex>& taps) override { diff --git a/gr-digital/include/gnuradio/digital/constellation.h b/gr-digital/include/gnuradio/digital/constellation.h index 7371932f60..a8fffe111e 100644 --- a/gr-digital/include/gnuradio/digital/constellation.h +++ b/gr-digital/include/gnuradio/digital/constellation.h @@ -243,7 +243,7 @@ public: unsigned int dimensionality, bool normalize_points = true); - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; // void calc_metric(gr_complex *sample, float *metric, trellis_metric_type_t type); // void calc_euclidean_metric(gr_complex *sample, float *metric); // void calc_hard_symbol_metric(gr_complex *sample, float *metric); @@ -288,9 +288,9 @@ public: unsigned int dimensionality, unsigned int n_sectors); - ~constellation_sector(); + ~constellation_sector() override; - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; protected: virtual unsigned int get_sector(const gr_complex* sample) = 0; @@ -346,7 +346,7 @@ public: unsigned int imag_sectors, float width_real_sectors, float width_imag_sectors); - ~constellation_rect(); + ~constellation_rect() override; protected: constellation_rect(std::vector<gr_complex> constell, @@ -357,9 +357,9 @@ protected: float width_real_sectors, float width_imag_sectors); - unsigned int get_sector(const gr_complex* sample); + unsigned int get_sector(const gr_complex* sample) override; gr_complex calc_sector_center(unsigned int sector); - unsigned int calc_sector_value(unsigned int sector); + unsigned int calc_sector_value(unsigned int sector) override; private: unsigned int n_real_sectors; @@ -403,7 +403,7 @@ public: float width_real_sectors, float width_imag_sectors, std::vector<unsigned int> sector_values); - ~constellation_expl_rect(); + ~constellation_expl_rect() override; protected: constellation_expl_rect(std::vector<gr_complex> constellation, @@ -415,7 +415,7 @@ protected: float width_imag_sectors, std::vector<unsigned int> sector_values); - unsigned int calc_sector_value(unsigned int sector) + unsigned int calc_sector_value(unsigned int sector) override { return d_sector_values[sector]; } @@ -450,12 +450,12 @@ public: std::vector<int> pre_diff_code, unsigned int n_sectors); - ~constellation_psk(); + ~constellation_psk() override; protected: - unsigned int get_sector(const gr_complex* sample); + unsigned int get_sector(const gr_complex* sample) override; - unsigned int calc_sector_value(unsigned int sector); + unsigned int calc_sector_value(unsigned int sector) override; constellation_psk(std::vector<gr_complex> constell, std::vector<int> pre_diff_code, @@ -487,9 +487,9 @@ public: // public constructor static sptr make(); - ~constellation_bpsk(); + ~constellation_bpsk() override; - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; protected: constellation_bpsk(); @@ -523,9 +523,9 @@ public: // public constructor static sptr make(); - ~constellation_qpsk(); + ~constellation_qpsk() override; - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; protected: constellation_qpsk(); @@ -558,9 +558,9 @@ public: // public constructor static sptr make(); - ~constellation_dqpsk(); + ~constellation_dqpsk() override; - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; protected: constellation_dqpsk(); @@ -595,9 +595,9 @@ public: // public constructor static sptr make(); - ~constellation_8psk(); + ~constellation_8psk() override; - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; protected: constellation_8psk(); @@ -631,9 +631,9 @@ public: // public constructor static sptr make(); - ~constellation_8psk_natural(); + ~constellation_8psk_natural() override; - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; protected: constellation_8psk_natural(); @@ -669,9 +669,9 @@ public: // public constructor static sptr make(); - ~constellation_16qam(); + ~constellation_16qam() override; - unsigned int decision_maker(const gr_complex* sample); + unsigned int decision_maker(const gr_complex* sample) override; protected: constellation_16qam(); diff --git a/gr-digital/include/gnuradio/digital/header_format_counter.h b/gr-digital/include/gnuradio/digital/header_format_counter.h index f04c76fa8a..185e556be4 100644 --- a/gr-digital/include/gnuradio/digital/header_format_counter.h +++ b/gr-digital/include/gnuradio/digital/header_format_counter.h @@ -53,7 +53,7 @@ public: typedef std::shared_ptr<header_format_counter> sptr; header_format_counter(const std::string& access_code, int threshold, int bps); - virtual ~header_format_counter(); + ~header_format_counter() override; /*! * Creates a header from the access code and packet length to @@ -72,15 +72,15 @@ public: * input PDU). Data can be extracted from this for the * header formatting or inserted. */ - virtual bool format(int nbytes_in, - const unsigned char* input, - pmt::pmt_t& output, - pmt::pmt_t& info); + bool format(int nbytes_in, + const unsigned char* input, + pmt::pmt_t& output, + pmt::pmt_t& info) override; /*! * Returns the length of the formatted header in bits. */ - virtual size_t header_nbits() const; + size_t header_nbits() const override; /*! * Factory to create an async packet header formatter; returns @@ -101,7 +101,7 @@ protected: uint16_t d_counter; //!< keeps track of the number of packets transmitted //! Verify that the header is valid - bool header_ok(); + bool header_ok() override; /*! Get info from the header; return payload length and package * rest of data in d_info dictionary. @@ -112,7 +112,7 @@ protected: | access code | pkt len | pkt len | bps | counter | payload | \endverbatim */ - int header_payload(); + int header_payload() override; }; } // namespace digital diff --git a/gr-digital/include/gnuradio/digital/header_format_crc.h b/gr-digital/include/gnuradio/digital/header_format_crc.h index 4db0376730..d89fcb08e5 100644 --- a/gr-digital/include/gnuradio/digital/header_format_crc.h +++ b/gr-digital/include/gnuradio/digital/header_format_crc.h @@ -49,7 +49,7 @@ public: typedef std::shared_ptr<header_format_crc> sptr; header_format_crc(const std::string& len_key_name = "packet_len", const std::string& num_key_name = "packet_num"); - virtual ~header_format_crc(); + ~header_format_crc() override; void set_header_num(unsigned header_num) { d_header_number = header_num; }; @@ -64,20 +64,20 @@ public: * - Bits 12-23: The header number (counts up everytime this function is called) * - Bit 24-31: 8-Bit CRC */ - virtual bool format(int nbytes_in, - const unsigned char* input, - pmt::pmt_t& output, - pmt::pmt_t& info); + bool format(int nbytes_in, + const unsigned char* input, + pmt::pmt_t& output, + pmt::pmt_t& info) override; - virtual bool parse(int nbits_in, - const unsigned char* input, - std::vector<pmt::pmt_t>& info, - int& nbits_processed); + bool parse(int nbits_in, + const unsigned char* input, + std::vector<pmt::pmt_t>& info, + int& nbits_processed) override; /*! * Returns the length of the formatted header in bits. */ - virtual size_t header_nbits() const; + size_t header_nbits() const override; /*! * Factory to create an async packet header formatter; returns @@ -93,12 +93,12 @@ protected: boost::crc_optimal<8, 0x07, 0xFF, 0x00, false, false> d_crc_impl; //! Verify that the header is valid - virtual bool header_ok(); + bool header_ok() override; /*! Get info from the header; return payload length and package * rest of data in d_info dictionary. */ - virtual int header_payload(); + int header_payload() override; }; } // namespace digital diff --git a/gr-digital/include/gnuradio/digital/header_format_default.h b/gr-digital/include/gnuradio/digital/header_format_default.h index 05f8d1e9f4..2f900f605a 100644 --- a/gr-digital/include/gnuradio/digital/header_format_default.h +++ b/gr-digital/include/gnuradio/digital/header_format_default.h @@ -70,7 +70,7 @@ class DIGITAL_API header_format_default : public header_format_base public: typedef std::shared_ptr<header_format_default> sptr; header_format_default(const std::string& access_code, int threshold, int bps); - virtual ~header_format_default(); + ~header_format_default() override; /*! * Creates a header from the access code and packet length and @@ -89,10 +89,10 @@ public: * input PDU). Data can be extracted from this for the * header formatting or inserted. */ - virtual bool format(int nbytes_in, - const unsigned char* input, - pmt::pmt_t& output, - pmt::pmt_t& info); + bool format(int nbytes_in, + const unsigned char* input, + pmt::pmt_t& output, + pmt::pmt_t& info) override; /*! * Parses a header of the form: @@ -124,15 +124,15 @@ public: * premature return after a bad header could be less than * this. */ - virtual bool parse(int nbits_in, - const unsigned char* input, - std::vector<pmt::pmt_t>& info, - int& nbits_processed); + bool parse(int nbits_in, + const unsigned char* input, + std::vector<pmt::pmt_t>& info, + int& nbits_processed) override; /*! * Returns the length of the formatted header in bits. */ - virtual size_t header_nbits() const; + size_t header_nbits() const override; /*! * Updates the access code. Must be a string of 1's and 0's and @@ -188,18 +188,18 @@ protected: int d_nbits; //!< num bits processed since reset //! Access code found, start getting the header - virtual void enter_have_sync(); + void enter_have_sync() override; //! Header found, setup for pulling in the hard decision bits - virtual void enter_have_header(int payload_len); + void enter_have_header(int payload_len) override; //! Verify that the header is valid - virtual bool header_ok(); + bool header_ok() override; /*! Get info from the header; return payload length and package * rest of data in d_info dictionary. */ - virtual int header_payload(); + int header_payload() override; }; } // namespace digital diff --git a/gr-digital/include/gnuradio/digital/header_format_ofdm.h b/gr-digital/include/gnuradio/digital/header_format_ofdm.h index 308b5f60ed..bfa143bb12 100644 --- a/gr-digital/include/gnuradio/digital/header_format_ofdm.h +++ b/gr-digital/include/gnuradio/digital/header_format_ofdm.h @@ -55,7 +55,7 @@ public: int bits_per_header_sym = 1, int bits_per_payload_sym = 1, bool scramble_header = false); - virtual ~header_format_ofdm(); + ~header_format_ofdm() override; /*! * \brief Encodes the header information in the given tags into @@ -68,20 +68,20 @@ public: * - Bits 12-23: The header number (counts up everytime this function is called) * - Bit 24-31: 8-Bit CRC */ - virtual bool format(int nbytes_in, - const unsigned char* input, - pmt::pmt_t& output, - pmt::pmt_t& info); + bool format(int nbytes_in, + const unsigned char* input, + pmt::pmt_t& output, + pmt::pmt_t& info) override; - virtual bool parse(int nbits_in, - const unsigned char* input, - std::vector<pmt::pmt_t>& info, - int& nbits_processed); + bool parse(int nbits_in, + const unsigned char* input, + std::vector<pmt::pmt_t>& info, + int& nbits_processed) override; /*! * Returns the length of the formatted header in bits. */ - virtual size_t header_nbits() const; + size_t header_nbits() const override; /*! * Factory to create an async packet header formatter; returns @@ -109,7 +109,7 @@ protected: /*! Get info from the header; return payload length and package * rest of data in d_info dictionary. */ - virtual int header_payload(); + int header_payload() override; }; } // namespace digital diff --git a/gr-digital/include/gnuradio/digital/mpsk_snr_est.h b/gr-digital/include/gnuradio/digital/mpsk_snr_est.h index 2d4d9b582c..6b29687ae8 100644 --- a/gr-digital/include/gnuradio/digital/mpsk_snr_est.h +++ b/gr-digital/include/gnuradio/digital/mpsk_snr_est.h @@ -100,10 +100,10 @@ public: * calculations. */ mpsk_snr_est_simple(double alpha); - ~mpsk_snr_est_simple() {} + ~mpsk_snr_est_simple() override {} - int update(int noutput_items, const gr_complex* input); - double snr(); + int update(int noutput_items, const gr_complex* input) override; + double snr() override; }; @@ -133,10 +133,10 @@ public: * calculations. */ mpsk_snr_est_skew(double alpha); - ~mpsk_snr_est_skew() {} + ~mpsk_snr_est_skew() override {} - int update(int noutput_items, const gr_complex* input); - double snr(); + int update(int noutput_items, const gr_complex* input) override; + double snr() override; }; @@ -169,10 +169,10 @@ public: * calculations. */ mpsk_snr_est_m2m4(double alpha); - ~mpsk_snr_est_m2m4() {} + ~mpsk_snr_est_m2m4() override {} - int update(int noutput_items, const gr_complex* input); - double snr(); + int update(int noutput_items, const gr_complex* input) override; + double snr() override; }; @@ -223,10 +223,10 @@ public: * \param kw: estimate of the channel noise kurtosis (2 for AWGN) */ snr_est_m2m4(double alpha, double ka, double kw); - ~snr_est_m2m4() {} + ~snr_est_m2m4() override {} - int update(int noutput_items, const gr_complex* input); - double snr(); + int update(int noutput_items, const gr_complex* input) override; + double snr() override; }; @@ -264,10 +264,10 @@ public: * calculations. */ mpsk_snr_est_svr(double alpha); - ~mpsk_snr_est_svr() {} + ~mpsk_snr_est_svr() override {} - int update(int noutput_items, const gr_complex* input); - double snr(); + int update(int noutput_items, const gr_complex* input) override; + double snr() override; }; } /* namespace digital */ diff --git a/gr-digital/include/gnuradio/digital/ofdm_equalizer_base.h b/gr-digital/include/gnuradio/digital/ofdm_equalizer_base.h index 328523295f..346c97686d 100644 --- a/gr-digital/include/gnuradio/digital/ofdm_equalizer_base.h +++ b/gr-digital/include/gnuradio/digital/ofdm_equalizer_base.h @@ -83,10 +83,10 @@ public: const std::vector<std::vector<gr_complex>>& pilot_symbols, int symbols_skipped, bool input_is_shifted); - ~ofdm_equalizer_1d_pilots(); + ~ofdm_equalizer_1d_pilots() override; - void reset(); - void get_channel_state(std::vector<gr_complex>& taps); + void reset() override; + void get_channel_state(std::vector<gr_complex>& taps) override; }; } /* namespace digital */ diff --git a/gr-digital/include/gnuradio/digital/ofdm_equalizer_simpledfe.h b/gr-digital/include/gnuradio/digital/ofdm_equalizer_simpledfe.h index 725ef7c6c8..6d485f2871 100644 --- a/gr-digital/include/gnuradio/digital/ofdm_equalizer_simpledfe.h +++ b/gr-digital/include/gnuradio/digital/ofdm_equalizer_simpledfe.h @@ -70,12 +70,12 @@ public: bool input_is_shifted = true, bool enable_soft_output = false); - ~ofdm_equalizer_simpledfe(); + ~ofdm_equalizer_simpledfe() override; void equalize(gr_complex* frame, int n_sym, const std::vector<gr_complex>& initial_taps = std::vector<gr_complex>(), - const std::vector<tag_t>& tags = std::vector<tag_t>()); + const std::vector<tag_t>& tags = std::vector<tag_t>()) override; /* * \param fft_len FFT length diff --git a/gr-digital/include/gnuradio/digital/ofdm_equalizer_static.h b/gr-digital/include/gnuradio/digital/ofdm_equalizer_static.h index 39ef12e793..a4852eaeee 100644 --- a/gr-digital/include/gnuradio/digital/ofdm_equalizer_static.h +++ b/gr-digital/include/gnuradio/digital/ofdm_equalizer_static.h @@ -45,7 +45,7 @@ public: std::vector<std::vector<gr_complex>>(), int symbols_skipped = 0, bool input_is_shifted = true); - ~ofdm_equalizer_static(); + ~ofdm_equalizer_static() override; /*! \brief Divide the input signal with the current channel state. * @@ -57,7 +57,7 @@ public: void equalize(gr_complex* frame, int n_sym, const std::vector<gr_complex>& initial_taps = std::vector<gr_complex>(), - const std::vector<tag_t>& tags = std::vector<tag_t>()); + const std::vector<tag_t>& tags = std::vector<tag_t>()) override; /* * \param fft_len FFT length diff --git a/gr-digital/include/gnuradio/digital/packet_header_ofdm.h b/gr-digital/include/gnuradio/digital/packet_header_ofdm.h index 7599849f70..3ebb780977 100644 --- a/gr-digital/include/gnuradio/digital/packet_header_ofdm.h +++ b/gr-digital/include/gnuradio/digital/packet_header_ofdm.h @@ -34,7 +34,7 @@ public: int bits_per_header_sym, int bits_per_payload_sym, bool scramble_header); - ~packet_header_ofdm(); + ~packet_header_ofdm() override; /*! * \brief Header formatter. @@ -43,8 +43,9 @@ public: * optionally scrambles the bits (this is more important for OFDM to avoid * PAPR spikes). */ - bool - header_formatter(long packet_len, unsigned char* out, const std::vector<tag_t>& tags); + bool header_formatter(long packet_len, + unsigned char* out, + const std::vector<tag_t>& tags) override; /*! * \brief Inverse function to header_formatter(). @@ -56,7 +57,7 @@ public: * of OFDM symbols and the packet length because a packet might * finish mid-OFDM-symbol. */ - bool header_parser(const unsigned char* header, std::vector<tag_t>& tags); + bool header_parser(const unsigned char* header, std::vector<tag_t>& tags) override; /*! * \param occupied_carriers See carrier allocator |