From d137fda820c5d39361e8d2a77bc972f3a2a031ae Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 13 Sep 2019 13:35:26 +0200 Subject: [PATCH] Apply clang-tidy --- .../gnuradio_blocks/pcps_opencl_acquisition_cc.cc | 8 ++++---- .../gnuradio_blocks/pcps_opencl_acquisition_cc.h | 6 +++--- .../signal_source/adapters/flexiband_signal_source.cc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc index c454c0cd5..c9a7188d0 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc @@ -71,7 +71,7 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc( int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename) + const std::string &dump_filename) { return pcps_opencl_acquisition_cc_sptr( new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, @@ -88,9 +88,9 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc( int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename) : gr::block("pcps_opencl_acquisition_cc", - gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), - gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) + const std::string &dump_filename) : gr::block("pcps_opencl_acquisition_cc", + gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), + gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) { this->message_port_register_out(pmt::mp("events")); d_sample_counter = 0ULL; // SAMPLE COUNTER diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h index b86eb040b..87105a2e9 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.h @@ -78,7 +78,7 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc( int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename); + const std::string& dump_filename); /*! * \brief This class implements a Parallel Code Phase Search Acquisition. @@ -213,14 +213,14 @@ private: int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename); + const std::string& dump_filename); pcps_opencl_acquisition_cc(uint32_t sampled_ms, uint32_t max_dwells, uint32_t doppler_max, int64_t fs_in, int samples_per_ms, int samples_per_code, bool bit_transition_flag, bool dump, - std::string dump_filename); + const std::string& dump_filename); void calculate_magnitudes(gr_complex* fft_begin, int doppler_shift, int doppler_offset); diff --git a/src/algorithms/signal_source/adapters/flexiband_signal_source.cc b/src/algorithms/signal_source/adapters/flexiband_signal_source.cc index e30cbae32..8e28fbb28 100644 --- a/src/algorithms/signal_source/adapters/flexiband_signal_source.cc +++ b/src/algorithms/signal_source/adapters/flexiband_signal_source.cc @@ -82,12 +82,12 @@ FlexibandSignalSource::FlexibandSignalSource(ConfigurationInterface* configurati // create I, Q -> gr_complex type conversion blocks for (int n = 0; n < (n_channels_ * 2); n++) { - char_to_float.push_back(gr::blocks::char_to_float::make()); + char_to_float.emplace_back(gr::blocks::char_to_float::make()); } for (int n = 0; n < n_channels_; n++) { - float_to_complex_.push_back(gr::blocks::float_to_complex::make()); + float_to_complex_.emplace_back(gr::blocks::float_to_complex::make()); null_sinks_.push_back(gr::blocks::null_sink::make(sizeof(gr_complex))); }