From cfb6f283d42c39735044e3bbca93f5a0534c00d9 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 27 Nov 2023 13:41:55 +0100 Subject: [PATCH] Fix some performance inefficiencies detected by Coverity Scan --- .../acquisition/adapters/beidou_b1i_pcps_acquisition.h | 2 +- .../acquisition/adapters/beidou_b3i_pcps_acquisition.h | 2 +- .../adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h | 2 +- .../adapters/galileo_e1_pcps_ambiguous_acquisition.h | 2 +- .../galileo_e1_pcps_ambiguous_acquisition_fpga.h | 2 +- .../galileo_e1_pcps_cccwsr_ambiguous_acquisition.h | 2 +- .../galileo_e1_pcps_quicksync_ambiguous_acquisition.h | 2 +- .../galileo_e1_pcps_tong_ambiguous_acquisition.h | 2 +- .../galileo_e5a_noncoherent_iq_acquisition_caf.h | 2 +- .../acquisition/adapters/galileo_e5a_pcps_acquisition.h | 2 +- .../adapters/galileo_e5a_pcps_acquisition_fpga.h | 2 +- .../acquisition/adapters/galileo_e5b_pcps_acquisition.h | 2 +- .../adapters/galileo_e5b_pcps_acquisition_fpga.h | 2 +- .../acquisition/adapters/galileo_e6_pcps_acquisition.h | 2 +- .../adapters/glonass_l1_ca_pcps_acquisition.h | 2 +- .../adapters/glonass_l2_ca_pcps_acquisition.h | 2 +- .../acquisition/adapters/gps_l1_ca_pcps_acquisition.h | 2 +- .../adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h | 2 +- .../adapters/gps_l1_ca_pcps_acquisition_fpga.h | 2 +- .../adapters/gps_l1_ca_pcps_assisted_acquisition.h | 2 +- .../adapters/gps_l1_ca_pcps_opencl_acquisition.h | 2 +- .../adapters/gps_l1_ca_pcps_quicksync_acquisition.h | 2 +- .../adapters/gps_l1_ca_pcps_tong_acquisition.h | 2 +- .../acquisition/adapters/gps_l2_m_pcps_acquisition.h | 2 +- .../adapters/gps_l2_m_pcps_acquisition_fpga.h | 2 +- .../acquisition/adapters/gps_l5i_pcps_acquisition.h | 2 +- .../acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h | 2 +- .../galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc | 2 +- .../gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc | 2 +- .../gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc | 2 +- .../gnuradio_blocks/pcps_assisted_acquisition_cc.cc | 2 +- .../gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc | 2 +- .../gnuradio_blocks/pcps_opencl_acquisition_cc.cc | 2 +- .../gnuradio_blocks/pcps_quicksync_acquisition_cc.cc | 2 +- .../gnuradio_blocks/pcps_tong_acquisition_cc.cc | 2 +- .../volk_gnsssdr/apps/volk_gnsssdr_profile.cc | 2 +- .../gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc | 5 +++-- .../gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc | 5 +++-- .../gnuradio_blocks/galileo_telemetry_decoder_gs.cc | 4 ++-- .../glonass_l1_ca_telemetry_decoder_gs.cc | 5 +++-- .../glonass_l2_ca_telemetry_decoder_gs.cc | 5 +++-- .../gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc | 5 +++-- .../gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc | 3 ++- .../gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc | 5 +++-- .../gnuradio_blocks/sbas_l1_telemetry_decoder_gs.cc | 3 ++- .../tracking/gnuradio_blocks/dll_pll_veml_tracking.cc | 2 +- .../gnuradio_blocks/dll_pll_veml_tracking_fpga.cc | 2 +- .../galileo_e1_tcp_connector_tracking_cc.cc | 4 ++-- .../glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc | 4 ++-- .../glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc | 4 ++-- .../gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc | 4 ++-- .../glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc | 4 ++-- .../glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc | 4 ++-- .../gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc | 4 ++-- .../gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc | 5 +++-- .../gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc | 4 ++-- .../gps_l1_ca_tcp_connector_tracking_cc.cc | 4 ++-- .../signal-processing-blocks/pvt/rinex_printer_test.cc | 9 +++++---- 58 files changed, 88 insertions(+), 78 deletions(-) diff --git a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h index b56489784..a5a659369 100644 --- a/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/beidou_b1i_pcps_acquisition.h @@ -97,7 +97,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h index 1e5b082bf..ccbaf8c53 100644 --- a/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/beidou_b3i_pcps_acquisition.h @@ -96,7 +96,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h index 9d0ed9abe..7903dff58 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.h @@ -93,7 +93,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h index ec2e2299e..995c2570a 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.h @@ -96,7 +96,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h index 597d9975a..0352d4dbd 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition_fpga.h @@ -122,7 +122,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_fpga_->set_channel_fsm(channel_fsm); + acquisition_fpga_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h index 284b5872a..fb53e690d 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.h @@ -94,7 +94,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h index 78b8a582f..7ba948513 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.h @@ -94,7 +94,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! * \brief Set statistics threshold of PCPS algorithm diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h index 250f8508c..33390e134 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.h @@ -94,7 +94,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! * \brief Set statistics threshold of TONG algorithm diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h index 2a5fa33a2..66323eb11 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.h @@ -94,7 +94,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h index 0a300e883..2b0f35050 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.h @@ -87,7 +87,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h index a33f6738e..f57d5d3b0 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition_fpga.h @@ -122,7 +122,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_fpga_->set_channel_fsm(channel_fsm); + acquisition_fpga_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition.h index 48c2bd4d2..76de8b140 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition.h @@ -118,7 +118,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition_fpga.h index 33545bd2b..34abc3ba6 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/galileo_e5b_pcps_acquisition_fpga.h @@ -121,7 +121,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_fpga_->set_channel_fsm(channel_fsm); + acquisition_fpga_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/galileo_e6_pcps_acquisition.h b/src/algorithms/acquisition/adapters/galileo_e6_pcps_acquisition.h index 21e2e166f..2902177a7 100644 --- a/src/algorithms/acquisition/adapters/galileo_e6_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/galileo_e6_pcps_acquisition.h @@ -96,7 +96,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h index 938fe0021..84999e6df 100644 --- a/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/glonass_l1_ca_pcps_acquisition.h @@ -98,7 +98,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h index 3927bd4f2..6d0f68eb4 100644 --- a/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/glonass_l2_ca_pcps_acquisition.h @@ -97,7 +97,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h index 6ad39ab03..5c79bd7de 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.h @@ -102,7 +102,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h index 01ef4e245..f59db4494 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.h @@ -96,7 +96,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h index f187d77c0..57786c570 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fpga.h @@ -123,7 +123,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_fpga_->set_channel_fsm(channel_fsm); + acquisition_fpga_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h index 099c38528..2745218ef 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.h @@ -95,7 +95,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h index 6f73fd97e..880d94281 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_opencl_acquisition.h @@ -93,7 +93,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h index be692b317..f10cbdaa5 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.h @@ -96,7 +96,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h index b7c7a119b..2a7ba680f 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.h @@ -94,7 +94,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_cc_->set_channel_fsm(channel_fsm); + acquisition_cc_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h index 8a3627f81..5f9e41615 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.h @@ -98,7 +98,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h index d105ea7e2..2003ab5a7 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition_fpga.h @@ -98,7 +98,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_fpga_->set_channel_fsm(channel_fsm); + acquisition_fpga_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h index 820329821..0578ae793 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.h @@ -97,7 +97,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_->set_channel_fsm(channel_fsm); + acquisition_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h index c68cd7bda..3a6beaf7e 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition_fpga.h @@ -125,7 +125,7 @@ public: inline void set_channel_fsm(std::weak_ptr channel_fsm) override { channel_fsm_ = channel_fsm; - acquisition_fpga_->set_channel_fsm(channel_fsm); + acquisition_fpga_->set_channel_fsm(channel_fsm_); } /*! diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc index 1e0f945b5..98861361b 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_e5a_noncoherent_iq_acquisition_caf_cc.cc @@ -730,7 +730,7 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items auto **out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); return_value = 1; // Number of Gnss_Synchro objects produced } diff --git a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc index e123424d6..17d697fed 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/galileo_pcps_8ms_acquisition_cc.cc @@ -381,7 +381,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items, auto **out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); noutput_items = 1; // Number of Gnss_Synchro objects produced } diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc index a1941a060..270238767 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_acquisition_fine_doppler_cc.cc @@ -566,7 +566,7 @@ int pcps_acquisition_fine_doppler_cc::general_work(int noutput_items, auto **out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); return_value = 1; // Number of Gnss_Synchro objects produced } break; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc index 56f4b56b3..3d919f87f 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc @@ -427,7 +427,7 @@ int pcps_assisted_acquisition_cc::general_work(int noutput_items, auto **out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); noutput_items = 1; // Number of Gnss_Synchro objects produced } break; diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc index 8498b7c27..e16d184a3 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc @@ -403,7 +403,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items, auto **out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); noutput_items = 1; // Number of Gnss_Synchro objects produced } 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 0d364bdd6..2f0e3662a 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_opencl_acquisition_cc.cc @@ -765,7 +765,7 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items, auto **out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); noutput_items = 1; // Number of Gnss_Synchro objects produced } diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc index 44dcb4c73..39bac577c 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc @@ -507,7 +507,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items, auto** out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); noutput_items = 1; // Number of Gnss_Synchro objects produced } diff --git a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc index 9563f3af6..f072dcd6a 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc @@ -403,7 +403,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items, auto **out = reinterpret_cast(&output_items[0]); Gnss_Synchro current_synchro_data = Gnss_Synchro(); current_synchro_data = *d_gnss_synchro; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); noutput_items = 1; // Number of Gnss_Synchro objects produced } diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc index d3c9269e0..5a060c3d1 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/apps/volk_gnsssdr_profile.cc @@ -232,7 +232,7 @@ void read_results(std::vector *results, std::string if (single_kernel_result.size() == 3) { - volk_gnsssdr_test_results_t kernel_result; + volk_gnsssdr_test_results_t kernel_result{}; kernel_result.name = std::string(single_kernel_result[0]); kernel_result.config_name = std::string(single_kernel_result[0]); kernel_result.best_arch_u = std::string(single_kernel_result[1]); diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc index 6798a2e17..0edbfee36 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b1i_telemetry_decoder_gs.cc @@ -36,6 +36,7 @@ #include // for setprecision #include // for cout #include // for shared_ptr, make_shared +#include // for std::move #define CRC_ERROR_LIMIT 8 @@ -702,8 +703,8 @@ int beidou_b1i_telemetry_decoder_gs::general_work(int noutput_items __attribute_ } } - // 3. Make the output (copy the object contents to the GNURadio reserved memory) - *out[0] = current_symbol; + // 3. Make the output (move the object contents to the GNURadio reserved memory) + *out[0] = std::move(current_symbol); return 1; } return 0; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc index dcd4609d0..a1fd40555 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/beidou_b3i_telemetry_decoder_gs.cc @@ -35,6 +35,7 @@ #include // for setprecision #include // for cout #include // for shared_ptr, make_shared +#include // for std::move #define CRC_ERROR_LIMIT 8 @@ -726,8 +727,8 @@ int beidou_b3i_telemetry_decoder_gs::general_work( } } - // 3. Make the output (copy the object contents to the GNURadio reserved memory) - *out[0] = current_symbol; + // 3. Make the output (move the object contents to the GNURadio reserved memory) + *out[0] = std::move(current_symbol); return 1; } return 0; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc index e597555aa..fbaaaa84f 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/galileo_telemetry_decoder_gs.cc @@ -1399,8 +1399,8 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( LOG(WARNING) << "Exception writing navigation data dump file " << e.what(); } } - // 3. Make the output (copy the object contents to the GNURadio reserved memory) - *out[0] = current_symbol; + // 3. Make the output (move the object contents to the GNURadio reserved memory) + *out[0] = std::move(current_symbol); return 1; } return 0; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc index 3d6aacbcc..b2cc50cf8 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l1_ca_telemetry_decoder_gs.cc @@ -33,6 +33,7 @@ #include // for std::setprecision #include // for cout #include // for shared_ptr, make_shared +#include // for std::move #define CRC_ERROR_LIMIT 6 @@ -525,8 +526,8 @@ int glonass_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu } } - // 3. Make the output (copy the object contents to the GNURadio reserved memory) - *out[0] = current_symbol; + // 3. Make the output (move the object contents to the GNURadio reserved memory) + *out[0] = std::move(current_symbol); return 1; } diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc index 2340b59ff..473e5eb73 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/glonass_l2_ca_telemetry_decoder_gs.cc @@ -33,6 +33,7 @@ #include // for std::setprecision #include // for cout #include // for shared_ptr, make_shared +#include // for std::move #define CRC_ERROR_LIMIT 6 @@ -528,8 +529,8 @@ int glonass_l2_ca_telemetry_decoder_gs::general_work(int noutput_items __attribu } } - // 3. Make the output (copy the object contents to the GNURadio reserved memory) - *out[0] = current_symbol; + // 3. Make the output (move the object contents to the GNURadio reserved memory) + *out[0] = std::move(current_symbol); return 1; } diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc index bf8b9ba21..178eb8bd4 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l1_ca_telemetry_decoder_gs.cc @@ -36,6 +36,7 @@ #include // for setprecision #include // for cout #include // for shared_ptr +#include // for std::move #include #ifdef COMPILER_HAS_ROTL @@ -659,8 +660,8 @@ int gps_l1_ca_telemetry_decoder_gs::general_work(int noutput_items __attribute__ } } - // 3. Make the output (copy the object contents to the GNU Radio reserved memory) - *out[0] = current_symbol; + // 3. Make the output (move the object contents to the GNU Radio reserved memory) + *out[0] = std::move(current_symbol); return 1; } diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc index 60b33d5b7..b745738da 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l2c_telemetry_decoder_gs.cc @@ -35,6 +35,7 @@ #include // for setprecision #include // for cout #include // for shared_ptr, make_shared +#include // for std::move gps_l2c_telemetry_decoder_gs_sptr @@ -368,6 +369,6 @@ int gps_l2c_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( } // 3. Make the output (copy the object contents to the GNURadio reserved memory) - out[0] = current_synchro_data; + out[0] = std::move(current_synchro_data); return 1; } diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc index f8ad72108..d664551ea 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/gps_l5_telemetry_decoder_gs.cc @@ -33,6 +33,7 @@ #include // for std::exception #include // for std::setprecision #include // for std::cout +#include // for std::move gps_l5_telemetry_decoder_gs_sptr gps_l5_make_telemetry_decoder_gs(const Gnss_Satellite &satellite, const Tlm_Conf &conf) @@ -383,8 +384,8 @@ int gps_l5_telemetry_decoder_gs::general_work(int noutput_items __attribute__((u } } - // 3. Make the output (copy the object contents to the GNURadio reserved memory) - out[0] = current_synchro_data; + // 3. Make the output (move the object contents to the GNURadio reserved memory) + out[0] = std::move(current_synchro_data); return 1; } return 0; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.cc index f1ec40229..9a15fd2b6 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_gs.cc @@ -25,6 +25,7 @@ #include // for abs #include // for exception #include // for operator<<, setw +#include // for std::move // logging levels #define EVENT 2 // logs important events which don't occur every block @@ -470,7 +471,7 @@ int sbas_l1_telemetry_decoder_gs::general_work(int noutput_items __attribute__(( // UPDATE GNSS SYNCHRO DATA // actually the SBAS telemetry decoder doesn't support ranging current_symbol.Flag_valid_word = false; // indicate to observable block that this synchro object isn't valid for pseudorange computation - out[0] = current_symbol; + out[0] = std::move(current_symbol); consume_each(1); // tell scheduler input items consumed return 1; // tell scheduler output items produced } diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc index 1d367d70e..a824f80ef 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking.cc @@ -2066,7 +2066,6 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) current_synchro_data.Tracking_sample_counter = this->nitems_read(0); current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; current_synchro_data.Flag_PLL_180_deg_phase_locked = d_Flag_PLL_180_deg_phase_locked; - *out[0] = current_synchro_data; // generate new tag associated with gnss-synchro object @@ -2088,6 +2087,7 @@ int dll_pll_veml_tracking::general_work(int noutput_items __attribute__((unused) d_timetag_waiting = false; } + *out[0] = std::move(current_synchro_data); return 1; } return 0; diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc index 923fc8fa0..8e70694ec 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc @@ -2015,7 +2015,7 @@ int dll_pll_veml_tracking_fpga::general_work(int noutput_items __attribute__((un current_synchro_data.Tracking_sample_counter = d_sample_counter_next; // d_sample_counter; current_synchro_data.Flag_valid_symbol_output = !loss_of_lock; current_synchro_data.Flag_PLL_180_deg_phase_locked = d_Flag_PLL_180_deg_phase_locked; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); return 1; } return 0; diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc index 4b6a44d14..d40c99783 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.cc @@ -291,7 +291,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples); current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast(samples_offset); current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); d_sample_counter = d_sample_counter + static_cast(samples_offset); // count for the processed samples d_pull_in = false; consume_each(samples_offset); // shift input to perform alignment with local replica @@ -438,7 +438,7 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri current_synchro_data.Signal[2] = '\0'; current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc index d3531eac8..32e0a2e2f 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -575,7 +575,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI; current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); consume_each(samples_offset); // shift input to perform alignment with local replica return 1; } @@ -811,7 +811,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at } // assign the GNU Radio block output data current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { // MULTIPLEXED FILE RECORDING - Record results to file diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc index c7dc7c22c..99108ee19 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -578,7 +578,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI; current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); consume_each(samples_offset); // shift input to perform alignment with local replica return 1; } @@ -813,7 +813,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast(d_correlation_length_samples); } current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { // MULTIPLEXED FILE RECORDING - Record results to file diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc index 4962899df..61e9e9feb 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_tracking_cc.cc @@ -518,7 +518,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.fs = d_fs_in; current_synchro_data.correlation_length_ms = 1; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); consume_each(samples_offset); // shift input to perform alignment with local replica return 1; } @@ -637,7 +637,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut // assign the GNU Radio block output data current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { // MULTIPLEXED FILE RECORDING - Record results to file diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc index bbba59cbf..6274a0b26 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc @@ -574,7 +574,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI; current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); consume_each(samples_offset); // shift input to perform alignment with local replica return 1; } @@ -806,7 +806,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_cc::general_work(int noutput_items __at } // assign the GNU Radio block output data current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { // MULTIPLEXED FILE RECORDING - Record results to file diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc index 410e42599..f88f217c4 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc @@ -575,7 +575,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at current_synchro_data.Carrier_phase_rads = d_acc_carrier_phase_cycles * TWO_PI; current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); consume_each(samples_offset); // shift input to perform alignment with local replica return 1; } @@ -810,7 +810,7 @@ int glonass_l2_ca_dll_pll_c_aid_tracking_sc::general_work(int noutput_items __at current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast(d_correlation_length_samples); } current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { // MULTIPLEXED FILE RECORDING - Record results to file diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc index a1afb3c84..56b892474 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l2_ca_dll_pll_tracking_cc.cc @@ -520,7 +520,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.fs = d_fs_in; current_synchro_data.correlation_length_ms = 1; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); consume_each(samples_offset); // shift input to perform alignment with local replica return 1; } @@ -639,7 +639,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut // assign the GNU Radio block output data current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { // MULTIPLEXED FILE RECORDING - Record results to file diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc index 1b6e7f2f6..9898ad178 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_tracking_gpu_cc.cc @@ -30,6 +30,7 @@ #include #include #include +#include gps_l1_ca_dll_pll_tracking_gpu_cc_sptr @@ -344,7 +345,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast(samples_offset); current_synchro_data.fs = d_fs_in; current_synchro_data.correlation_length_ms = 1; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); d_sample_counter += static_cast(samples_offset); // count for the processed samples d_pull_in = false; consume_each(samples_offset); // shift input to perform alignment with local replica @@ -479,7 +480,7 @@ int Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::general_work(int noutput_items __attribut // assign the GNU Radio block output data current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc index 6faf12488..df97429eb 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_gaussian_tracking_cc.cc @@ -634,7 +634,7 @@ int Gps_L1_Ca_Gaussian_Tracking_cc::general_work(int noutput_items __attribute__ current_synchro_data.Carrier_Doppler_hz = d_carrier_doppler_hz; current_synchro_data.fs = d_fs_in; current_synchro_data.correlation_length_ms = 1; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); // Kalman filter initialization reset kf_P_x = kf_P_x_ini; // Update Kalman states based on acquisition information @@ -811,7 +811,7 @@ int Gps_L1_Ca_Gaussian_Tracking_cc::general_work(int noutput_items __attribute__ // assign the GNU Radio block output data current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc index f646d7512..fb94fc2de 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.cc @@ -319,7 +319,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples); current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast(samples_offset); current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); d_sample_counter_seconds = d_sample_counter_seconds + (static_cast(samples_offset) / static_cast(d_fs_in)); d_sample_counter = d_sample_counter + static_cast(samples_offset); // count for the processed samples d_pull_in = false; @@ -468,7 +468,7 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib current_synchro_data.Signal[2] = '\0'; current_synchro_data.fs = d_fs_in; - *out[0] = current_synchro_data; + *out[0] = std::move(current_synchro_data); if (d_dump) { diff --git a/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc b/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc index 8885e7367..68f029c1c 100644 --- a/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/pvt/rinex_printer_test.cc @@ -21,6 +21,7 @@ #include "rtklib_solver.h" #include #include +#include class RinexPrinterTest : public ::testing::Test @@ -296,9 +297,9 @@ TEST_F(RinexPrinterTest, MixedObsHeader) Pvt_Conf conf; conf.use_e6_for_pvt = false; auto pvt_solution = std::make_shared(rtk, conf, "filename", 106, false, false); - pvt_solution->galileo_ephemeris_map[1] = eph_gal; + pvt_solution->galileo_ephemeris_map[1] = std::move(eph_gal); - pvt_solution->gps_ephemeris_map[1] = eph_gps; + pvt_solution->gps_ephemeris_map[1] = std::move(eph_gps); std::map gnss_observables_map; Gnss_Synchro gs{}; @@ -603,8 +604,8 @@ TEST_F(RinexPrinterTest, GpsObsLogDualBand) Pvt_Conf conf; conf.use_e6_for_pvt = false; auto pvt_solution = std::make_shared(rtk, conf, "filename", 7, false, false); - pvt_solution->gps_ephemeris_map[1] = eph; - pvt_solution->gps_cnav_ephemeris_map[1] = eph_cnav; + pvt_solution->gps_ephemeris_map[1] = std::move(eph); + pvt_solution->gps_cnav_ephemeris_map[1] = std::move(eph_cnav); std::map gnss_observables_map; Gnss_Synchro gs1 = Gnss_Synchro();