From 1743a773b5925d550d1c91cead23044e7274aa6c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 3 Dec 2018 19:01:47 +0100 Subject: [PATCH] Improve performance by using const and std::move() to avoid unnecessary copies --- src/algorithms/PVT/libs/hybrid_ls_pvt.cc | 3 +- src/algorithms/PVT/libs/rinex_printer.cc | 26 ++++----- src/algorithms/PVT/libs/rinex_printer.h | 26 ++++----- src/algorithms/PVT/libs/rtcm_printer.cc | 7 ++- src/algorithms/PVT/libs/rtcm_printer.h | 4 +- src/algorithms/PVT/libs/rtklib_solver.cc | 4 +- ...o_e5a_noncoherent_iq_acquisition_caf_cc.cc | 5 +- .../galileo_pcps_8ms_acquisition_cc.cc | 5 +- .../pcps_assisted_acquisition_cc.cc | 5 +- .../pcps_cccwsr_acquisition_cc.cc | 5 +- .../pcps_quicksync_acquisition_cc.cc | 5 +- .../pcps_tong_acquisition_cc.cc | 5 +- .../adapters/ibyte_to_cbyte.cc | 2 +- .../adapters/ibyte_to_cbyte.h | 2 +- .../adapters/ibyte_to_complex.cc | 2 +- .../adapters/ibyte_to_complex.h | 2 +- .../adapters/ibyte_to_cshort.cc | 2 +- .../adapters/ibyte_to_cshort.h | 2 +- .../adapters/ishort_to_complex.cc | 2 +- .../adapters/ishort_to_complex.h | 2 +- .../adapters/ishort_to_cshort.cc | 2 +- .../adapters/ishort_to_cshort.h | 2 +- .../adapters/beamformer_filter.cc | 2 +- .../input_filter/adapters/beamformer_filter.h | 2 +- .../input_filter/adapters/notch_filter.cc | 2 +- .../input_filter/adapters/notch_filter.h | 2 +- .../adapters/notch_filter_lite.cc | 2 +- .../input_filter/adapters/notch_filter_lite.h | 2 +- src/algorithms/libs/gnss_sdr_valve.cc | 4 +- src/algorithms/libs/pass_through.cc | 2 +- src/algorithms/libs/pass_through.h | 2 +- .../adapters/hybrid_observables.cc | 2 +- .../observables/adapters/hybrid_observables.h | 2 +- .../gnuradio_blocks/hybrid_observables_cc.cc | 5 +- .../adapters/direct_resampler_conditioner.cc | 2 +- .../adapters/direct_resampler_conditioner.h | 2 +- .../adapters/mmse_resampler_conditioner.cc | 2 +- .../adapters/mmse_resampler_conditioner.h | 2 +- .../adapters/signal_generator.cc | 2 +- .../adapters/signal_generator.h | 2 +- .../gnuradio_blocks/signal_generator_c.cc | 2 +- .../adapters/file_signal_source.cc | 2 +- .../adapters/file_signal_source.h | 2 +- .../adapters/labsat_signal_source.cc | 2 +- .../adapters/labsat_signal_source.h | 2 +- .../adapters/nsr_file_signal_source.cc | 2 +- .../adapters/nsr_file_signal_source.h | 2 +- .../adapters/rtl_tcp_signal_source.cc | 9 ++- .../adapters/rtl_tcp_signal_source.h | 6 +- .../adapters/spir_file_signal_source.cc | 2 +- .../adapters/spir_file_signal_source.h | 2 +- .../spir_gss6450_file_signal_source.cc | 2 +- .../spir_gss6450_file_signal_source.h | 2 +- .../two_bit_cpx_file_signal_source.cc | 2 +- .../adapters/two_bit_cpx_file_signal_source.h | 2 +- .../two_bit_packed_file_signal_source.cc | 2 +- .../two_bit_packed_file_signal_source.h | 2 +- .../adapters/uhd_signal_source.cc | 2 +- .../adapters/uhd_signal_source.h | 2 +- .../adapters/galileo_e1b_telemetry_decoder.cc | 2 +- .../adapters/galileo_e1b_telemetry_decoder.h | 2 +- .../adapters/galileo_e5a_telemetry_decoder.cc | 2 +- .../adapters/galileo_e5a_telemetry_decoder.h | 2 +- .../glonass_l1_ca_telemetry_decoder.cc | 2 +- .../glonass_l1_ca_telemetry_decoder.h | 2 +- .../glonass_l2_ca_telemetry_decoder.cc | 2 +- .../glonass_l2_ca_telemetry_decoder.h | 2 +- .../adapters/gps_l1_ca_telemetry_decoder.cc | 2 +- .../adapters/gps_l1_ca_telemetry_decoder.h | 2 +- .../adapters/gps_l2c_telemetry_decoder.cc | 2 +- .../adapters/gps_l2c_telemetry_decoder.h | 2 +- .../adapters/gps_l5_telemetry_decoder.cc | 2 +- .../adapters/gps_l5_telemetry_decoder.h | 2 +- .../adapters/sbas_l1_telemetry_decoder.cc | 2 +- .../adapters/sbas_l1_telemetry_decoder.h | 2 +- .../sbas_l1_telemetry_decoder_cc.cc | 12 ++-- .../sbas_l1_telemetry_decoder_cc.h | 12 ++-- .../galileo_e1_dll_pll_veml_tracking.cc | 2 +- .../galileo_e1_dll_pll_veml_tracking.h | 2 +- .../galileo_e1_tcp_connector_tracking.cc | 2 +- .../galileo_e1_tcp_connector_tracking.h | 2 +- .../adapters/galileo_e5a_dll_pll_tracking.cc | 2 +- .../adapters/galileo_e5a_dll_pll_tracking.h | 2 +- .../glonass_l1_ca_dll_pll_c_aid_tracking.cc | 2 +- .../glonass_l1_ca_dll_pll_c_aid_tracking.h | 2 +- .../glonass_l1_ca_dll_pll_tracking.cc | 2 +- .../adapters/glonass_l1_ca_dll_pll_tracking.h | 2 +- .../glonass_l2_ca_dll_pll_c_aid_tracking.cc | 2 +- .../glonass_l2_ca_dll_pll_c_aid_tracking.h | 2 +- .../glonass_l2_ca_dll_pll_tracking.cc | 2 +- .../adapters/glonass_l2_ca_dll_pll_tracking.h | 2 +- .../gps_l1_ca_dll_pll_c_aid_tracking.cc | 2 +- .../gps_l1_ca_dll_pll_c_aid_tracking.h | 2 +- .../adapters/gps_l1_ca_dll_pll_tracking.cc | 2 +- .../adapters/gps_l1_ca_dll_pll_tracking.h | 2 +- .../adapters/gps_l1_ca_kf_tracking.cc | 2 +- .../tracking/adapters/gps_l1_ca_kf_tracking.h | 2 +- .../gps_l1_ca_tcp_connector_tracking.cc | 2 +- .../gps_l1_ca_tcp_connector_tracking.h | 2 +- .../adapters/gps_l2_m_dll_pll_tracking.cc | 2 +- .../adapters/gps_l2_m_dll_pll_tracking.h | 2 +- .../adapters/gps_l5_dll_pll_tracking.cc | 2 +- .../adapters/gps_l5_dll_pll_tracking.h | 2 +- .../galileo_e1_tcp_connector_tracking_cc.cc | 5 +- .../galileo_e1_tcp_connector_tracking_cc.h | 4 +- ...glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc | 7 ++- ...glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc | 7 ++- .../glonass_l1_ca_dll_pll_tracking_cc.cc | 5 +- ...glonass_l2_ca_dll_pll_c_aid_tracking_cc.cc | 7 ++- ...glonass_l2_ca_dll_pll_c_aid_tracking_sc.cc | 7 ++- .../glonass_l2_ca_dll_pll_tracking_cc.cc | 5 +- .../gps_l1_ca_dll_pll_c_aid_tracking_cc.cc | 7 ++- .../gps_l1_ca_dll_pll_c_aid_tracking_sc.cc | 7 ++- .../gps_l1_ca_kf_tracking_cc.cc | 5 +- .../gps_l1_ca_tcp_connector_tracking_cc.cc | 5 +- .../gps_l1_ca_tcp_connector_tracking_cc.h | 4 +- src/core/libs/INIReader.cc | 9 +-- src/core/libs/INIReader.h | 4 +- src/core/libs/gnss_sdr_supl_client.cc | 58 +++++++++---------- src/core/libs/gnss_sdr_supl_client.h | 52 ++++++++--------- src/core/receiver/gnss_flowgraph.cc | 2 +- src/core/receiver/gnss_flowgraph.h | 2 +- .../glonass_gnav_navigation_message.cc | 8 +-- .../glonass_gnav_navigation_message.h | 8 +-- .../libs/rtklib_solver_dump_reader.cc | 3 +- .../libs/spirent_motion_csv_dump_reader.cc | 3 +- src/tests/system-tests/position_test.cc | 4 +- .../gps_l1_ca_pcps_acquisition_test.cc | 5 +- .../libs/acquisition_msg_rx.cc | 3 +- .../libs/observables_dump_reader.cc | 3 +- .../libs/tlm_dump_reader.cc | 3 +- .../libs/tracking_dump_reader.cc | 3 +- .../libs/tracking_true_obs_reader.cc | 3 +- .../libs/true_observables_reader.cc | 3 +- src/utils/front-end-cal/front_end_cal.cc | 3 +- src/utils/front-end-cal/main.cc | 5 +- 136 files changed, 309 insertions(+), 268 deletions(-) diff --git a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc index 5ca6ef597..007552187 100644 --- a/src/algorithms/PVT/libs/hybrid_ls_pvt.cc +++ b/src/algorithms/PVT/libs/hybrid_ls_pvt.cc @@ -34,6 +34,7 @@ #include "GPS_L1_CA.h" #include "GPS_L2C.h" #include +#include #include @@ -43,7 +44,7 @@ hybrid_ls_pvt::hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag { // init empty ephemeris for all the available GNSS channels d_nchannels = nchannels; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_flag_dump_enabled = flag_dump_to_file; d_galileo_current_time = 0; count_valid_position = 0; diff --git a/src/algorithms/PVT/libs/rinex_printer.cc b/src/algorithms/PVT/libs/rinex_printer.cc index ffacd1cae..fdd6ec9ab 100644 --- a/src/algorithms/PVT/libs/rinex_printer.cc +++ b/src/algorithms/PVT/libs/rinex_printer.cc @@ -254,7 +254,7 @@ void Rinex_Printer::lengthCheck(const std::string& line) } -std::string Rinex_Printer::createFilename(std::string type) +std::string Rinex_Printer::createFilename(const std::string& type) { const std::string stationName = "GSDR"; // 4-character station name designator boost::gregorian::date today = boost::gregorian::day_clock::local_day(); @@ -3529,7 +3529,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map& observables, const std::string glonass_band) +void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, const double obs_time, const std::map& observables, const std::string& glonass_band) { // RINEX observations timestamps are GPS timestamps. std::string line; @@ -8669,7 +8669,7 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, c } -void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map& observables, const std::string galileo_bands) +void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map& observables, const std::string& galileo_bands) { // RINEX observations timestamps are Galileo timestamps. // See http://gage14.upc.es/gLAB/HTML/Observation_Rinex_v3.01.html diff --git a/src/algorithms/PVT/libs/rinex_printer.h b/src/algorithms/PVT/libs/rinex_printer.h index 1f33176ff..00c8497db 100644 --- a/src/algorithms/PVT/libs/rinex_printer.h +++ b/src/algorithms/PVT/libs/rinex_printer.h @@ -146,52 +146,52 @@ public: /*! * \brief Generates the GPS L2 Observation data header */ - void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const double d_TOW_first_observation, const std::string gps_bands = "2S"); + void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph, const double d_TOW_first_observation, const std::string& gps_bands = "2S"); /*! * \brief Generates the dual frequency GPS L1 & L2/L5 Observation data header */ - void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation, const std::string gps_bands = "1C 2S"); + void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation, const std::string& gps_bands = "1C 2S"); /*! * \brief Generates the Galileo Observation data header. Example: bands("1B"), bands("1B 5X"), bands("5X"), ... Default: "1B". */ - void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& eph, const double d_TOW_first_observation, const std::string bands = "1B"); + void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& eph, const double d_TOW_first_observation, const std::string& bands = "1B"); /*! * \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". */ - void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string galileo_bands = "1B"); + void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string& galileo_bands = "1B"); /*! * \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". */ - void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string gps_bands = "1C 2S", const std::string galileo_bands = "1B"); + void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string& gps_bands = "1C 2S", const std::string& galileo_bands = "1B"); /*! * \brief Generates the Mixed (GPS/Galileo) Observation data header. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". */ - void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string gps_bands = "2S", const std::string galileo_bands = "1B"); + void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& eph_cnav, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string& gps_bands = "2S", const std::string& galileo_bands = "1B"); /*! * \brief Generates the GLONASS GNAV Observation data header. Example: bands("1C"), bands("1C 2C"), bands("2C"), ... Default: "1C". */ - void rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string bands = "1G"); + void rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string& bands = "1G"); /*! * \brief Generates the Mixed (GPS L1 C/A /GLONASS) Observation data header. Example: galileo_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". */ - void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string glo_bands = "1C"); + void rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glo_bands = "1C"); /*! * \brief Generates the Mixed (Galileo/GLONASS) Observation data header. Example: galileo_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". */ - void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string galileo_bands = "1B", const std::string glo_bands = "1C"); + void rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& galileo_bands = "1B", const std::string& glo_bands = "1C"); /*! * \brief Generates the Mixed (GPS L2C/GLONASS) Observation data header. Example: galileo_bands("1G")... Default: "1G". */ - void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string glo_bands = "1G"); + void rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_cnav_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string& glo_bands = "1G"); /*! * \brief Generates the SBAS raw data header @@ -297,7 +297,7 @@ public: /*! * \brief Writes Galileo observables into the RINEX file. Example: galileo_bands("1B"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". */ - void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map& observables, const std::string galileo_bands = "1B"); + void log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& eph, double obs_time, const std::map& observables, const std::string& galileo_bands = "1B"); /*! * \brief Writes Mixed GPS / Galileo observables into the RINEX file @@ -317,7 +317,7 @@ public: /*! * \brief Writes GLONASS GNAV observables into the RINEX file. Example: glonass_bands("1C"), galileo_bands("1B 5X"), galileo_bands("5X"), ... Default: "1B". */ - void log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, double obs_time, const std::map& observables, const std::string glonass_bands = "1C"); + void log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, double obs_time, const std::map& observables, const std::string& glonass_bands = "1C"); /*! * \brief Writes Mixed GPS L1 C/A - GLONASS observables into the RINEX file @@ -406,7 +406,7 @@ private: * "RINEX_FILE_TYPE_SBAS" - SBAS broadcast data file. * "RINEX_FILE_TYPE_CLK" - Clock file. */ - std::string createFilename(std::string type); + std::string createFilename(const std::string& type); /* * Generates the data for the PGM / RUN BY / DATE line diff --git a/src/algorithms/PVT/libs/rtcm_printer.cc b/src/algorithms/PVT/libs/rtcm_printer.cc index 40934e833..350e57608 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.cc +++ b/src/algorithms/PVT/libs/rtcm_printer.cc @@ -38,6 +38,7 @@ #include // for filesystem #include #include +#include #include // for O_RDWR #include // for tcgetattr @@ -45,7 +46,7 @@ using google::LogMessage; -Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_devname, bool time_tag_name, const std::string& base_path) +Rtcm_Printer::Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_devname, bool time_tag_name, const std::string& base_path) { boost::posix_time::ptime pt = boost::posix_time::second_clock::local_time(); tm timeinfo = boost::posix_time::to_tm(pt); @@ -141,7 +142,7 @@ Rtcm_Printer::Rtcm_Printer(std::string filename, bool flag_rtcm_file_dump, bool } } - rtcm_devname = rtcm_dump_devname; + rtcm_devname = std::move(rtcm_dump_devname); if (flag_rtcm_tty_port == true) { rtcm_dev_descriptor = init_serial(rtcm_devname.c_str()); @@ -337,7 +338,7 @@ bool Rtcm_Printer::Print_Rtcm_MSM(uint32_t msm_number, const Gps_Ephemeris& gps_ } -int Rtcm_Printer::init_serial(std::string serial_device) +int Rtcm_Printer::init_serial(const std::string& serial_device) { /* * Opens the serial device and sets the default baud rate for a RTCM transmission (9600,8,N,1) diff --git a/src/algorithms/PVT/libs/rtcm_printer.h b/src/algorithms/PVT/libs/rtcm_printer.h index bb34f7ea6..9e3b9cf7c 100644 --- a/src/algorithms/PVT/libs/rtcm_printer.h +++ b/src/algorithms/PVT/libs/rtcm_printer.h @@ -48,7 +48,7 @@ public: /*! * \brief Default constructor. */ - Rtcm_Printer(std::string filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_filename, bool time_tag_name = true, const std::string& base_path = "."); + Rtcm_Printer(const std::string& filename, bool flag_rtcm_file_dump, bool flag_rtcm_server, bool flag_rtcm_tty_port, uint16_t rtcm_tcp_port, uint16_t rtcm_station_id, std::string rtcm_dump_filename, bool time_tag_name = true, const std::string& base_path = "."); /*! * \brief Default destructor. @@ -149,7 +149,7 @@ private: uint16_t port; uint16_t station_id; int32_t rtcm_dev_descriptor; // RTCM serial device descriptor (i.e. COM port) - int32_t init_serial(std::string serial_device); //serial port control + int32_t init_serial(const std::string& serial_device); //serial port control void close_serial(); std::shared_ptr rtcm; bool Print_Message(const std::string& message); diff --git a/src/algorithms/PVT/libs/rtklib_solver.cc b/src/algorithms/PVT/libs/rtklib_solver.cc index b8fac5ea4..4e00c5621 100644 --- a/src/algorithms/PVT/libs/rtklib_solver.cc +++ b/src/algorithms/PVT/libs/rtklib_solver.cc @@ -60,6 +60,8 @@ #include #include +#include + using google::LogMessage; @@ -67,7 +69,7 @@ rtklib_solver::rtklib_solver(int nchannels, std::string dump_filename, bool flag { // init empty ephemeris for all the available GNSS channels d_nchannels = nchannels; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_flag_dump_enabled = flag_dump_to_file; d_flag_dump_mat_enabled = flag_dump_to_mat; count_valid_position = 0; 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 59912a699..c884bcf34 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 @@ -42,6 +42,7 @@ #include #include #include +#include using google::LogMessage; @@ -59,7 +60,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make { return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr( new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, - samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_)); + samples_per_code, bit_transition_flag, dump, std::move(dump_filename), both_signal_components_, CAF_window_hz_, Zero_padding_)); } @@ -152,7 +153,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit // For dumping samples into a file d_dump = dump; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_doppler_resolution = 0; d_threshold = 0; 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 81b5022e9..eaf7ff134 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 @@ -31,6 +31,7 @@ #include "galileo_pcps_8ms_acquisition_cc.h" #include +#include #include #include #include @@ -47,7 +48,7 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc( { return galileo_pcps_8ms_acquisition_cc_sptr( new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, samples_per_ms, - samples_per_code, dump, dump_filename)); + samples_per_code, dump, std::move(dump_filename))); } galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc( @@ -87,7 +88,7 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_doppler_resolution = 0; d_threshold = 0; 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 0067d9640..43850040b 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_assisted_acquisition_cc.cc @@ -32,6 +32,7 @@ #include "pcps_assisted_acquisition_cc.h" #include +#include #include #include #include @@ -52,7 +53,7 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc( { return pcps_assisted_acquisition_cc_sptr( new pcps_assisted_acquisition_cc(max_dwells, sampled_ms, doppler_max, doppler_min, - fs_in, samples_per_ms, dump, dump_filename)); + fs_in, samples_per_ms, dump, std::move(dump_filename))); } @@ -89,7 +90,7 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_doppler_resolution = 0; d_threshold = 0; 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 801ebaef5..e0872e9eb 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_cccwsr_acquisition_cc.cc @@ -36,6 +36,7 @@ #include "pcps_cccwsr_acquisition_cc.h" #include +#include #include #include #include @@ -54,7 +55,7 @@ pcps_cccwsr_acquisition_cc_sptr pcps_cccwsr_make_acquisition_cc( { return pcps_cccwsr_acquisition_cc_sptr( new pcps_cccwsr_acquisition_cc(sampled_ms, max_dwells, doppler_max, fs_in, - samples_per_ms, samples_per_code, dump, dump_filename)); + samples_per_ms, samples_per_code, dump, std::move(dump_filename))); } pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc( @@ -98,7 +99,7 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_doppler_resolution = 0; d_threshold = 0; 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 ee57a3866..159f09978 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_quicksync_acquisition_cc.cc @@ -37,6 +37,7 @@ #include #include #include +#include using google::LogMessage; @@ -57,7 +58,7 @@ pcps_quicksync_acquisition_cc_sptr pcps_quicksync_make_acquisition_cc( fs_in, samples_per_ms, samples_per_code, bit_transition_flag, - dump, dump_filename)); + dump, std::move(dump_filename))); } @@ -110,7 +111,7 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_corr_acumulator = nullptr; d_signal_folded = nullptr; 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 ef6ef133a..47617e953 100644 --- a/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc +++ b/src/algorithms/acquisition/gnuradio_blocks/pcps_tong_acquisition_cc.cc @@ -56,6 +56,7 @@ #include #include #include +#include using google::LogMessage; @@ -68,7 +69,7 @@ pcps_tong_acquisition_cc_sptr pcps_tong_make_acquisition_cc( { return pcps_tong_acquisition_cc_sptr( new pcps_tong_acquisition_cc(sampled_ms, doppler_max, fs_in, samples_per_ms, samples_per_code, - tong_init_val, tong_max_val, tong_max_dwells, dump, dump_filename)); + tong_init_val, tong_max_val, tong_max_dwells, dump, std::move(dump_filename))); } pcps_tong_acquisition_cc::pcps_tong_acquisition_cc( @@ -111,7 +112,7 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc( // For dumping samples into a file d_dump = dump; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_doppler_resolution = 0; d_threshold = 0; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc index e8543e460..4d773eb7e 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.cc @@ -36,7 +36,7 @@ using google::LogMessage; -IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, std::string role, +IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) { std::string default_input_item_type = "byte"; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h index 7f0b83483..3fb202a1a 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cbyte.h @@ -48,7 +48,7 @@ class IbyteToCbyte : public GNSSBlockInterface { public: IbyteToCbyte(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams); virtual ~IbyteToCbyte(); diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc index c6b5d66d0..6e448d536 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.cc @@ -34,7 +34,7 @@ using google::LogMessage; -IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, std::string role, +IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) { std::string default_input_item_type = "byte"; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h index c768e4b46..677ba11e8 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_complex.h @@ -48,7 +48,7 @@ class IbyteToComplex : public GNSSBlockInterface { public: IbyteToComplex(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams); virtual ~IbyteToComplex(); diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc index cc901d4a1..ea2580c25 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.cc @@ -37,7 +37,7 @@ using google::LogMessage; -IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, std::string role, +IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) { std::string default_input_item_type = "byte"; diff --git a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h index cc94b866f..73e64da0d 100644 --- a/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h +++ b/src/algorithms/data_type_adapter/adapters/ibyte_to_cshort.h @@ -48,7 +48,7 @@ class IbyteToCshort : public GNSSBlockInterface { public: IbyteToCshort(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams); virtual ~IbyteToCshort(); diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc index 27cb17afa..54cea92b3 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.cc @@ -34,7 +34,7 @@ using google::LogMessage; -IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::string role, +IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) { std::string default_input_item_type = "short"; diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h index 8a60afa15..7359cfae1 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_complex.h @@ -47,7 +47,7 @@ class IshortToComplex : public GNSSBlockInterface { public: IshortToComplex(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams); virtual ~IshortToComplex(); diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc index 1f41f20c4..a6d07ab21 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.cc @@ -36,7 +36,7 @@ using google::LogMessage; -IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, std::string role, +IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams) { std::string default_input_item_type = "short"; diff --git a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h index 382ce7716..925065a1d 100644 --- a/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h +++ b/src/algorithms/data_type_adapter/adapters/ishort_to_cshort.h @@ -48,7 +48,7 @@ class IshortToCshort : public GNSSBlockInterface { public: IshortToCshort(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams); virtual ~IshortToCshort(); diff --git a/src/algorithms/input_filter/adapters/beamformer_filter.cc b/src/algorithms/input_filter/adapters/beamformer_filter.cc index 7dfabae6c..52c19352d 100644 --- a/src/algorithms/input_filter/adapters/beamformer_filter.cc +++ b/src/algorithms/input_filter/adapters/beamformer_filter.cc @@ -38,7 +38,7 @@ using google::LogMessage; BeamformerFilter::BeamformerFilter( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_stream, unsigned int out_stream) : role_(role), in_stream_(in_stream), out_stream_(out_stream) { std::string default_item_type = "gr_complex"; diff --git a/src/algorithms/input_filter/adapters/beamformer_filter.h b/src/algorithms/input_filter/adapters/beamformer_filter.h index 78fec45ca..c97c32732 100644 --- a/src/algorithms/input_filter/adapters/beamformer_filter.h +++ b/src/algorithms/input_filter/adapters/beamformer_filter.h @@ -46,7 +46,7 @@ class BeamformerFilter : public GNSSBlockInterface { public: BeamformerFilter(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream); virtual ~BeamformerFilter(); diff --git a/src/algorithms/input_filter/adapters/notch_filter.cc b/src/algorithms/input_filter/adapters/notch_filter.cc index 38985def4..c9264e0f7 100644 --- a/src/algorithms/input_filter/adapters/notch_filter.cc +++ b/src/algorithms/input_filter/adapters/notch_filter.cc @@ -38,7 +38,7 @@ using google::LogMessage; -NotchFilter::NotchFilter(ConfigurationInterface* configuration, std::string role, +NotchFilter::NotchFilter(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { size_t item_size_; diff --git a/src/algorithms/input_filter/adapters/notch_filter.h b/src/algorithms/input_filter/adapters/notch_filter.h index 3bdf5c688..bf7e4f2db 100644 --- a/src/algorithms/input_filter/adapters/notch_filter.h +++ b/src/algorithms/input_filter/adapters/notch_filter.h @@ -45,7 +45,7 @@ class NotchFilter : public GNSSBlockInterface { public: NotchFilter(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams); virtual ~NotchFilter(); diff --git a/src/algorithms/input_filter/adapters/notch_filter_lite.cc b/src/algorithms/input_filter/adapters/notch_filter_lite.cc index 94aa66c31..3c83369d5 100644 --- a/src/algorithms/input_filter/adapters/notch_filter_lite.cc +++ b/src/algorithms/input_filter/adapters/notch_filter_lite.cc @@ -38,7 +38,7 @@ using google::LogMessage; -NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, std::string role, +NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { size_t item_size_; diff --git a/src/algorithms/input_filter/adapters/notch_filter_lite.h b/src/algorithms/input_filter/adapters/notch_filter_lite.h index 901326579..d8352706d 100644 --- a/src/algorithms/input_filter/adapters/notch_filter_lite.h +++ b/src/algorithms/input_filter/adapters/notch_filter_lite.h @@ -45,7 +45,7 @@ class NotchFilterLite : public GNSSBlockInterface { public: NotchFilterLite(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams); virtual ~NotchFilterLite(); diff --git a/src/algorithms/libs/gnss_sdr_valve.cc b/src/algorithms/libs/gnss_sdr_valve.cc index 3e076f871..9e8dec580 100644 --- a/src/algorithms/libs/gnss_sdr_valve.cc +++ b/src/algorithms/libs/gnss_sdr_valve.cc @@ -56,14 +56,14 @@ gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item, boost::shared_ptr gnss_sdr_make_valve(size_t sizeof_stream_item, unsigned long long nitems, gr::msg_queue::sptr queue, bool stop_flowgraph) { - boost::shared_ptr valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, stop_flowgraph)); + boost::shared_ptr valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph)); return valve_; } boost::shared_ptr gnss_sdr_make_valve(size_t sizeof_stream_item, unsigned long long nitems, gr::msg_queue::sptr queue) { - boost::shared_ptr valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, true)); + boost::shared_ptr valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), true)); return valve_; } diff --git a/src/algorithms/libs/pass_through.cc b/src/algorithms/libs/pass_through.cc index 4fc56372d..fc50da210 100644 --- a/src/algorithms/libs/pass_through.cc +++ b/src/algorithms/libs/pass_through.cc @@ -38,7 +38,7 @@ using google::LogMessage; -Pass_Through::Pass_Through(ConfigurationInterface* configuration, std::string role, +Pass_Through::Pass_Through(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/libs/pass_through.h b/src/algorithms/libs/pass_through.h index 83100eab2..223256ab9 100644 --- a/src/algorithms/libs/pass_through.h +++ b/src/algorithms/libs/pass_through.h @@ -51,7 +51,7 @@ class Pass_Through : public GNSSBlockInterface { public: Pass_Through(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_stream, unsigned int out_stream); diff --git a/src/algorithms/observables/adapters/hybrid_observables.cc b/src/algorithms/observables/adapters/hybrid_observables.cc index 9c8971dbd..f92c02b48 100644 --- a/src/algorithms/observables/adapters/hybrid_observables.cc +++ b/src/algorithms/observables/adapters/hybrid_observables.cc @@ -38,7 +38,7 @@ using google::LogMessage; HybridObservables::HybridObservables(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { std::string default_dump_filename = "./observables.dat"; DLOG(INFO) << "role " << role; diff --git a/src/algorithms/observables/adapters/hybrid_observables.h b/src/algorithms/observables/adapters/hybrid_observables.h index 1beb968fa..35015b837 100644 --- a/src/algorithms/observables/adapters/hybrid_observables.h +++ b/src/algorithms/observables/adapters/hybrid_observables.h @@ -47,7 +47,7 @@ class HybridObservables : public ObservablesInterface { public: HybridObservables(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc index 0d63485ab..ffd2dfdf0 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc @@ -42,6 +42,7 @@ #include #include #include +#include using google::LogMessage; @@ -49,7 +50,7 @@ using google::LogMessage; hybrid_observables_cc_sptr hybrid_make_observables_cc(unsigned int nchannels_in, unsigned int nchannels_out, bool dump, bool dump_mat, std::string dump_filename) { - return hybrid_observables_cc_sptr(new hybrid_observables_cc(nchannels_in, nchannels_out, dump, dump_mat, dump_filename)); + return hybrid_observables_cc_sptr(new hybrid_observables_cc(nchannels_in, nchannels_out, dump, dump_mat, std::move(dump_filename))); } @@ -63,7 +64,7 @@ hybrid_observables_cc::hybrid_observables_cc(uint32_t nchannels_in, { d_dump = dump; d_dump_mat = dump_mat and d_dump; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_nchannels_out = nchannels_out; d_nchannels_in = nchannels_in; T_rx_clock_step_samples = 0U; diff --git a/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc b/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc index 836ce39b7..8c128b47b 100644 --- a/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc +++ b/src/algorithms/resampler/adapters/direct_resampler_conditioner.cc @@ -43,7 +43,7 @@ using google::LogMessage; DirectResamplerConditioner::DirectResamplerConditioner( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_stream, unsigned int out_stream) : role_(role), in_stream_(in_stream), out_stream_(out_stream) { std::string default_item_type = "short"; diff --git a/src/algorithms/resampler/adapters/direct_resampler_conditioner.h b/src/algorithms/resampler/adapters/direct_resampler_conditioner.h index a874b9268..300ce297f 100644 --- a/src/algorithms/resampler/adapters/direct_resampler_conditioner.h +++ b/src/algorithms/resampler/adapters/direct_resampler_conditioner.h @@ -47,7 +47,7 @@ class DirectResamplerConditioner : public GNSSBlockInterface { public: DirectResamplerConditioner(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream); virtual ~DirectResamplerConditioner(); diff --git a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc index b13a310f6..1a0ad9abf 100644 --- a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc +++ b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.cc @@ -39,7 +39,7 @@ using google::LogMessage; MmseResamplerConditioner::MmseResamplerConditioner( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_stream, unsigned int out_stream) : role_(role), in_stream_(in_stream), out_stream_(out_stream) { std::string default_item_type = "gr_complex"; diff --git a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h index 462e49e88..b3cc61e03 100644 --- a/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h +++ b/src/algorithms/resampler/adapters/mmse_resampler_conditioner.h @@ -55,7 +55,7 @@ class MmseResamplerConditioner : public GNSSBlockInterface { public: MmseResamplerConditioner(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream); virtual ~MmseResamplerConditioner(); diff --git a/src/algorithms/signal_generator/adapters/signal_generator.cc b/src/algorithms/signal_generator/adapters/signal_generator.cc index 4620bc8e4..72dafe542 100644 --- a/src/algorithms/signal_generator/adapters/signal_generator.cc +++ b/src/algorithms/signal_generator/adapters/signal_generator.cc @@ -44,7 +44,7 @@ using google::LogMessage; SignalGenerator::SignalGenerator(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream, boost::shared_ptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue)) { std::string default_item_type = "gr_complex"; diff --git a/src/algorithms/signal_generator/adapters/signal_generator.h b/src/algorithms/signal_generator/adapters/signal_generator.h index 52a2a0f82..7009eb853 100644 --- a/src/algorithms/signal_generator/adapters/signal_generator.h +++ b/src/algorithms/signal_generator/adapters/signal_generator.h @@ -52,7 +52,7 @@ class SignalGenerator : public GNSSBlockInterface { public: SignalGenerator(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream, boost::shared_ptr queue); virtual ~SignalGenerator(); diff --git a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc index 6308cd9c1..f600a3bb8 100644 --- a/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc +++ b/src/algorithms/signal_generator/gnuradio_blocks/signal_generator_c.cc @@ -53,7 +53,7 @@ signal_make_generator_c(std::vector signal1, std::vector &delay_chips, const std::vector &delay_sec, bool data_flag, bool noise_flag, unsigned int fs_in, unsigned int vector_length, float BW_BB) { - return gnuradio::get_initial_sptr(new signal_generator_c(signal1, system, PRN, CN0_dB, doppler_Hz, delay_chips, delay_sec, + return gnuradio::get_initial_sptr(new signal_generator_c(std::move(signal1), std::move(system), PRN, CN0_dB, doppler_Hz, delay_chips, delay_sec, data_flag, noise_flag, fs_in, vector_length, BW_BB)); } diff --git a/src/algorithms/signal_source/adapters/file_signal_source.cc b/src/algorithms/signal_source/adapters/file_signal_source.cc index 4b78133c2..5f674cc79 100644 --- a/src/algorithms/signal_source/adapters/file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/file_signal_source.cc @@ -46,7 +46,7 @@ using google::LogMessage; FileSignalSource::FileSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, unsigned int out_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) { std::string default_filename = "./example_capture.dat"; diff --git a/src/algorithms/signal_source/adapters/file_signal_source.h b/src/algorithms/signal_source/adapters/file_signal_source.h index 4e1347e31..548180a31 100644 --- a/src/algorithms/signal_source/adapters/file_signal_source.h +++ b/src/algorithms/signal_source/adapters/file_signal_source.h @@ -53,7 +53,7 @@ class ConfigurationInterface; class FileSignalSource : public GNSSBlockInterface { public: - FileSignalSource(ConfigurationInterface* configuration, std::string role, + FileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue); diff --git a/src/algorithms/signal_source/adapters/labsat_signal_source.cc b/src/algorithms/signal_source/adapters/labsat_signal_source.cc index 6ae8e0859..6e31e2ac4 100644 --- a/src/algorithms/signal_source/adapters/labsat_signal_source.cc +++ b/src/algorithms/signal_source/adapters/labsat_signal_source.cc @@ -39,7 +39,7 @@ using google::LogMessage; LabsatSignalSource::LabsatSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue)) + const std::string& role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue)) { std::string default_item_type = "gr_complex"; std::string default_dump_file = "./data/source.bin"; diff --git a/src/algorithms/signal_source/adapters/labsat_signal_source.h b/src/algorithms/signal_source/adapters/labsat_signal_source.h index ef11713e3..e31cd049a 100644 --- a/src/algorithms/signal_source/adapters/labsat_signal_source.h +++ b/src/algorithms/signal_source/adapters/labsat_signal_source.h @@ -47,7 +47,7 @@ class LabsatSignalSource : public GNSSBlockInterface { public: LabsatSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream, gr::msg_queue::sptr queue); virtual ~LabsatSignalSource(); diff --git a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc index 37589cef9..ef46fd725 100644 --- a/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/nsr_file_signal_source.cc @@ -46,7 +46,7 @@ using google::LogMessage; NsrFileSignalSource::NsrFileSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, unsigned int out_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) { std::string default_filename = "../data/my_capture.dat"; diff --git a/src/algorithms/signal_source/adapters/nsr_file_signal_source.h b/src/algorithms/signal_source/adapters/nsr_file_signal_source.h index c1e0f6bb4..d96b8645b 100644 --- a/src/algorithms/signal_source/adapters/nsr_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/nsr_file_signal_source.h @@ -53,7 +53,7 @@ class ConfigurationInterface; class NsrFileSignalSource : public GNSSBlockInterface { public: - NsrFileSignalSource(ConfigurationInterface* configuration, std::string role, + NsrFileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue); diff --git a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc index c3a6aa620..6e644119d 100644 --- a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc +++ b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.cc @@ -44,8 +44,13 @@ using google::LogMessage; RtlTcpSignalSource::RtlTcpSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, unsigned int out_stream, - boost::shared_ptr queue) : role_(std::move(role)), in_stream_(in_stream), out_stream_(out_stream), queue_(queue) + const std::string& role, + unsigned int in_stream, + unsigned int out_stream, + boost::shared_ptr queue) : role_(std::move(role)), + in_stream_(in_stream), + out_stream_(out_stream), + queue_(queue) { // DUMP PARAMETERS std::string empty = ""; diff --git a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h index a1966c3ad..f50adeded 100644 --- a/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h +++ b/src/algorithms/signal_source/adapters/rtl_tcp_signal_source.h @@ -54,8 +54,10 @@ class RtlTcpSignalSource : public GNSSBlockInterface { public: RtlTcpSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, - unsigned int out_stream, boost::shared_ptr queue); + const std::string& role, + unsigned int in_stream, + unsigned int out_stream, + boost::shared_ptr queue); virtual ~RtlTcpSignalSource(); diff --git a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc index 7e3918b3e..f01dec094 100644 --- a/src/algorithms/signal_source/adapters/spir_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/spir_file_signal_source.cc @@ -45,7 +45,7 @@ using google::LogMessage; SpirFileSignalSource::SpirFileSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_streams, unsigned int out_streams, + const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) { std::string default_filename = "../data/my_capture.dat"; diff --git a/src/algorithms/signal_source/adapters/spir_file_signal_source.h b/src/algorithms/signal_source/adapters/spir_file_signal_source.h index 70a7eb659..25ace35c8 100644 --- a/src/algorithms/signal_source/adapters/spir_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/spir_file_signal_source.h @@ -50,7 +50,7 @@ class ConfigurationInterface; class SpirFileSignalSource : public GNSSBlockInterface { public: - SpirFileSignalSource(ConfigurationInterface* configuration, std::string role, + SpirFileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue); diff --git a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc index 17223243a..ff8f45411 100644 --- a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.cc @@ -43,7 +43,7 @@ using google::LogMessage; SpirGSS6450FileSignalSource::SpirGSS6450FileSignalSource(ConfigurationInterface* configuration, - std::string role, uint32_t in_streams, uint32_t out_streams, gr::msg_queue::sptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) + const std::string& role, uint32_t in_streams, uint32_t out_streams, gr::msg_queue::sptr queue) : role_(role), in_streams_(in_streams), out_streams_(out_streams), queue_(std::move(queue)) { std::string default_filename = "../data/my_capture.dat"; std::string default_dump_filename = "../data/my_capture_dump.dat"; diff --git a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h index a37a4fe7f..34e1229e2 100644 --- a/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/spir_gss6450_file_signal_source.h @@ -57,7 +57,7 @@ class ConfigurationInterface; class SpirGSS6450FileSignalSource : public GNSSBlockInterface { public: - SpirGSS6450FileSignalSource(ConfigurationInterface* configuration, std::string role, + SpirGSS6450FileSignalSource(ConfigurationInterface* configuration, const std::string& role, uint32_t in_streams, uint32_t out_streams, gr::msg_queue::sptr queue); virtual ~SpirGSS6450FileSignalSource(); diff --git a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc index fbaa2adf2..8f113cd72 100644 --- a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.cc @@ -45,7 +45,7 @@ using google::LogMessage; TwoBitCpxFileSignalSource::TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue) : role_(role), diff --git a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h index 0088e1287..4de90a666 100644 --- a/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/two_bit_cpx_file_signal_source.h @@ -56,7 +56,7 @@ class TwoBitCpxFileSignalSource : public GNSSBlockInterface { public: TwoBitCpxFileSignalSource(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue); diff --git a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc index 134996fcf..f06d5040b 100644 --- a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc +++ b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.cc @@ -47,7 +47,7 @@ using google::LogMessage; TwoBitPackedFileSignalSource::TwoBitPackedFileSignalSource(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue) : role_(role), diff --git a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h index 00019ce4c..286b0e3ab 100644 --- a/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h +++ b/src/algorithms/signal_source/adapters/two_bit_packed_file_signal_source.h @@ -56,7 +56,7 @@ class ConfigurationInterface; class TwoBitPackedFileSignalSource : public GNSSBlockInterface { public: - TwoBitPackedFileSignalSource(ConfigurationInterface* configuration, std::string role, + TwoBitPackedFileSignalSource(ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams, boost::shared_ptr queue); diff --git a/src/algorithms/signal_source/adapters/uhd_signal_source.cc b/src/algorithms/signal_source/adapters/uhd_signal_source.cc index 3850ca4cc..8002c9c8d 100644 --- a/src/algorithms/signal_source/adapters/uhd_signal_source.cc +++ b/src/algorithms/signal_source/adapters/uhd_signal_source.cc @@ -43,7 +43,7 @@ using google::LogMessage; UhdSignalSource::UhdSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, unsigned int out_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream, boost::shared_ptr queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue)) { // DUMP PARAMETERS diff --git a/src/algorithms/signal_source/adapters/uhd_signal_source.h b/src/algorithms/signal_source/adapters/uhd_signal_source.h index bfe13ddb1..a5a34b08b 100644 --- a/src/algorithms/signal_source/adapters/uhd_signal_source.h +++ b/src/algorithms/signal_source/adapters/uhd_signal_source.h @@ -50,7 +50,7 @@ class UhdSignalSource : public GNSSBlockInterface { public: UhdSignalSource(ConfigurationInterface* configuration, - std::string role, unsigned int in_stream, + const std::string& role, unsigned int in_stream, unsigned int out_stream, boost::shared_ptr queue); virtual ~UhdSignalSource(); diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc index cb79cd8b5..300bb3100 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.cc @@ -44,7 +44,7 @@ using google::LogMessage; GalileoE1BTelemetryDecoder::GalileoE1BTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h index 119e294ad..1e921a2a7 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e1b_telemetry_decoder.h @@ -50,7 +50,7 @@ class GalileoE1BTelemetryDecoder : public TelemetryDecoderInterface { public: GalileoE1BTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc index ffca2a78a..7f0b0c49e 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.cc @@ -47,7 +47,7 @@ using google::LogMessage; GalileoE5aTelemetryDecoder::GalileoE5aTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h index 022636384..cdb21af2d 100644 --- a/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/galileo_e5a_telemetry_decoder.h @@ -50,7 +50,7 @@ class GalileoE5aTelemetryDecoder : public TelemetryDecoderInterface { public: GalileoE5aTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc index 6bec2ae43..e01bb5552 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.cc @@ -43,7 +43,7 @@ using google::LogMessage; GlonassL1CaTelemetryDecoder::GlonassL1CaTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h index c35fc68e0..7823071f0 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l1_ca_telemetry_decoder.h @@ -47,7 +47,7 @@ class GlonassL1CaTelemetryDecoder : public TelemetryDecoderInterface { public: GlonassL1CaTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc index cc3aa9b58..fb4d95bea 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.cc @@ -42,7 +42,7 @@ using google::LogMessage; GlonassL2CaTelemetryDecoder::GlonassL2CaTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h index 27c7774bd..bd0f5d346 100644 --- a/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/glonass_l2_ca_telemetry_decoder.h @@ -46,7 +46,7 @@ class GlonassL2CaTelemetryDecoder : public TelemetryDecoderInterface { public: GlonassL2CaTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc index 279ae544f..4075b6662 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.cc @@ -43,7 +43,7 @@ using google::LogMessage; GpsL1CaTelemetryDecoder::GpsL1CaTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h index ec4efbb86..9436e8ae5 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l1_ca_telemetry_decoder.h @@ -46,7 +46,7 @@ class GpsL1CaTelemetryDecoder : public TelemetryDecoderInterface { public: GpsL1CaTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc index 7bf577643..5e99f3791 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.cc @@ -43,7 +43,7 @@ using google::LogMessage; GpsL2CTelemetryDecoder::GpsL2CTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h index fefb15e97..f7e9fb76b 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l2c_telemetry_decoder.h @@ -46,7 +46,7 @@ class GpsL2CTelemetryDecoder : public TelemetryDecoderInterface { public: GpsL2CTelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc index dd053a14a..17a09550f 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.cc @@ -39,7 +39,7 @@ using google::LogMessage; GpsL5TelemetryDecoder::GpsL5TelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h index 06da22d47..d9a200fd6 100644 --- a/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/gps_l5_telemetry_decoder.h @@ -49,7 +49,7 @@ class GpsL5TelemetryDecoder : public TelemetryDecoderInterface { public: GpsL5TelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc index 651671b04..38c731f98 100644 --- a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc +++ b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.cc @@ -41,7 +41,7 @@ using google::LogMessage; SbasL1TelemetryDecoder::SbasL1TelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), diff --git a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h index 9da1b44f9..1616f4ea0 100644 --- a/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h +++ b/src/algorithms/telemetry_decoder/adapters/sbas_l1_telemetry_decoder.h @@ -48,7 +48,7 @@ class SbasL1TelemetryDecoder : public TelemetryDecoderInterface { public: SbasL1TelemetryDecoder(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc index 50e306c03..25b3cdaa2 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.cc @@ -125,7 +125,7 @@ void sbas_l1_telemetry_decoder_cc::sample_aligner::reset() /* * samples length must be a multiple of two */ -bool sbas_l1_telemetry_decoder_cc::sample_aligner::get_symbols(const std::vector samples, std::vector &symbols) +bool sbas_l1_telemetry_decoder_cc::sample_aligner::get_symbols(const std::vector& samples, std::vector &symbols) { double smpls[3] = {}; double corr_diff; @@ -213,7 +213,7 @@ void sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::reset() } -bool sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const std::vector symbols, std::vector &bits) +bool sbas_l1_telemetry_decoder_cc::symbol_aligner_and_decoder::get_bits(const std::vector& symbols, std::vector &bits) { const int32_t traceback_depth = 5 * d_KK; int32_t nbits_requested = symbols.size() / d_symbols_per_bit; @@ -258,7 +258,7 @@ void sbas_l1_telemetry_decoder_cc::frame_detector::reset() } -void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const std::vector bits, std::vector>> &msg_candidates) +void sbas_l1_telemetry_decoder_cc::frame_detector::get_frame_candidates(const std::vector& bits, std::vector>> &msg_candidates) { std::stringstream ss; uint32_t sbas_msg_length = 250; @@ -323,7 +323,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::reset() } -void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vector msg_candidates, std::vector &valid_msgs) +void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vector& msg_candidates, std::vector &valid_msgs) { std::stringstream ss; VLOG(FLOW) << "get_valid_frames(): " @@ -361,7 +361,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::get_valid_frames(const std::vec } -void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_bytes(const std::vector msg_candidate, std::vector &bytes) +void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_bytes(const std::vector& msg_candidate, std::vector &bytes) { std::stringstream ss; const size_t bits_per_byte = 8; @@ -388,7 +388,7 @@ void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_back_and_convert_to_by } -void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_bytes(const std::vector msg_candidate, std::vector &bytes) +void sbas_l1_telemetry_decoder_cc::crc_verifier::zerropad_front_and_convert_to_bytes(const std::vector& msg_candidate, std::vector &bytes) { std::stringstream ss; const size_t bits_per_byte = 8; diff --git a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h index 27853723f..9bf2f05f3 100644 --- a/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h +++ b/src/algorithms/telemetry_decoder/gnuradio_blocks/sbas_l1_telemetry_decoder_cc.h @@ -104,7 +104,7 @@ private: * samples length must be a multiple of two * for block operation */ - bool get_symbols(const std::vector samples, std::vector &symbols); + bool get_symbols(const std::vector& samples, std::vector &symbols); private: int32_t d_n_smpls_in_history; @@ -122,7 +122,7 @@ private: symbol_aligner_and_decoder(); ~symbol_aligner_and_decoder(); void reset(); - bool get_bits(const std::vector symbols, std::vector &bits); + bool get_bits(const std::vector& symbols, std::vector &bits); private: int32_t d_KK; @@ -137,7 +137,7 @@ private: { public: void reset(); - void get_frame_candidates(const std::vector bits, std::vector>> &msg_candidates); + void get_frame_candidates(const std::vector& bits, std::vector>> &msg_candidates); private: std::deque d_buffer; @@ -149,13 +149,13 @@ private: { public: void reset(); - void get_valid_frames(const std::vector msg_candidates, std::vector &valid_msgs); + void get_valid_frames(const std::vector& msg_candidates, std::vector &valid_msgs); private: typedef boost::crc_optimal<24, 0x1864CFBu, 0x0, 0x0, false, false> crc_24_q_type; crc_24_q_type d_checksum_agent; - void zerropad_front_and_convert_to_bytes(const std::vector msg_candidate, std::vector &bytes); - void zerropad_back_and_convert_to_bytes(const std::vector msg_candidate, std::vector &bytes); + void zerropad_front_and_convert_to_bytes(const std::vector& msg_candidate, std::vector &bytes); + void zerropad_back_and_convert_to_bytes(const std::vector& msg_candidate, std::vector &bytes); } d_crc_verifier; }; diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc index c4127e3fe..2853dc995 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { Dll_Pll_Conf trk_param = Dll_Pll_Conf(); diff --git a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h index f6193fde5..04014d31b 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h +++ b/src/algorithms/tracking/adapters/galileo_e1_dll_pll_veml_tracking.h @@ -52,7 +52,7 @@ class GalileoE1DllPllVemlTracking : public TrackingInterface { public: GalileoE1DllPllVemlTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc index 599f80e8e..eac7a8edf 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.cc @@ -48,7 +48,7 @@ using google::LogMessage; GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.h b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.h index 8a75834d6..01d62b60b 100644 --- a/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.h +++ b/src/algorithms/tracking/adapters/galileo_e1_tcp_connector_tracking.h @@ -53,7 +53,7 @@ class GalileoE1TcpConnectorTracking : public TrackingInterface { public: GalileoE1TcpConnectorTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc index 7137d1279..7bc826568 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { Dll_Pll_Conf trk_param = Dll_Pll_Conf(); diff --git a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h index c9444f503..a91b8b556 100644 --- a/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/galileo_e5a_dll_pll_tracking.h @@ -52,7 +52,7 @@ class GalileoE5aDllPllTracking : public TrackingInterface { public: GalileoE5aDllPllTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc index cd919bcaa..d03ed7aad 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc @@ -48,7 +48,7 @@ using google::LogMessage; GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h index 26e1f0db9..aa9ab78d5 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.h @@ -54,7 +54,7 @@ class GlonassL1CaDllPllCAidTracking : public TrackingInterface { public: GlonassL1CaDllPllCAidTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc index 5226c52a3..d5d530761 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h index d5e1a4544..57c4db85e 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_tracking.h @@ -52,7 +52,7 @@ class GlonassL1CaDllPllTracking : public TrackingInterface { public: GlonassL1CaDllPllTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc index 3c7733522..19f872068 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.cc @@ -46,7 +46,7 @@ using google::LogMessage; GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.h b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.h index 085cf73ac..a35fec269 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.h +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_c_aid_tracking.h @@ -52,7 +52,7 @@ class GlonassL2CaDllPllCAidTracking : public TrackingInterface { public: GlonassL2CaDllPllCAidTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc index c32e4b2f2..16b223000 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.cc @@ -45,7 +45,7 @@ using google::LogMessage; GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.h index 1c2b715ed..7cf16c5ef 100644 --- a/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/glonass_l2_ca_dll_pll_tracking.h @@ -51,7 +51,7 @@ class GlonassL2CaDllPllTracking : public TrackingInterface { public: GlonassL2CaDllPllTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc index 21ce65416..f1bf74ef2 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h index 6b4dec2e5..04793a841 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_c_aid_tracking.h @@ -53,7 +53,7 @@ class GpsL1CaDllPllCAidTracking : public TrackingInterface { public: GpsL1CaDllPllCAidTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc index 6cd928353..df14b07c2 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { Dll_Pll_Conf trk_param = Dll_Pll_Conf(); diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h index cbd4797f2..f3d62a2e5 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_dll_pll_tracking.h @@ -51,7 +51,7 @@ class GpsL1CaDllPllTracking : public TrackingInterface { public: GpsL1CaDllPllTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc index d89d8909e..37b4d817b 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.cc @@ -49,7 +49,7 @@ using google::LogMessage; GpsL1CaKfTracking::GpsL1CaKfTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.h index d8af76ce8..e26198619 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_kf_tracking.h @@ -53,7 +53,7 @@ class GpsL1CaKfTracking : public TrackingInterface { public: GpsL1CaKfTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc index 5a017ed30..db4370b74 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(std::move(role)), in_streams_(in_streams), out_streams_(out_streams) { DLOG(INFO) << "role " << role; diff --git a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.h b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.h index f2fb94b3a..d81f1af9e 100644 --- a/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l1_ca_tcp_connector_tracking.h @@ -52,7 +52,7 @@ class GpsL1CaTcpConnectorTracking : public TrackingInterface { public: GpsL1CaTcpConnectorTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc index 04f2a79ff..08fecebc4 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GpsL2MDllPllTracking::GpsL2MDllPllTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { Dll_Pll_Conf trk_param = Dll_Pll_Conf(); diff --git a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h index 23835c405..854fd61e7 100644 --- a/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l2_m_dll_pll_tracking.h @@ -51,7 +51,7 @@ class GpsL2MDllPllTracking : public TrackingInterface { public: GpsL2MDllPllTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc index 39980adae..22bcb5c25 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.cc @@ -47,7 +47,7 @@ using google::LogMessage; GpsL5DllPllTracking::GpsL5DllPllTracking( - ConfigurationInterface* configuration, std::string role, + ConfigurationInterface* configuration, const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams) { Dll_Pll_Conf trk_param = Dll_Pll_Conf(); diff --git a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.h b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.h index 59a8983fc..83ce4865d 100644 --- a/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.h +++ b/src/algorithms/tracking/adapters/gps_l5_dll_pll_tracking.h @@ -50,7 +50,7 @@ class GpsL5DllPllTracking : public TrackingInterface { public: GpsL5DllPllTracking(ConfigurationInterface* configuration, - std::string role, + const std::string& role, unsigned int in_streams, unsigned int out_streams); 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 1acc70c76..3c2620306 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 @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -63,7 +64,7 @@ galileo_e1_tcp_connector_tracking_cc_sptr galileo_e1_tcp_connector_make_tracking int64_t fs_in, uint32_t vector_length, bool dump, - std::string dump_filename, + const std::string& dump_filename, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips, @@ -103,7 +104,7 @@ Galileo_E1_Tcp_Connector_Tracking_cc::Galileo_E1_Tcp_Connector_Tracking_cc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); // Initialize tracking ========================================== //--- DLL variables -------------------------------------------------------- diff --git a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h index 724207ab3..dedb723f5 100644 --- a/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/galileo_e1_tcp_connector_tracking_cc.h @@ -57,7 +57,7 @@ galileo_e1_tcp_connector_tracking_cc_sptr galileo_e1_tcp_connector_make_tracking_cc( int64_t fs_in, uint32_t vector_length, bool dump, - std::string dump_filename, + const std::string& dump_filename, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips, @@ -87,7 +87,7 @@ private: galileo_e1_tcp_connector_make_tracking_cc( int64_t fs_in, uint32_t vector_length, bool dump, - std::string dump_filename, + const std::string& dump_filename, float pll_bw_hz, float dll_bw_hz, float early_late_space_chips, 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 ed905fafa..c2d7d9364 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 @@ -54,6 +54,7 @@ #include #include #include +#include #define CN0_ESTIMATION_SAMPLES 10 @@ -74,7 +75,7 @@ glonass_l1_ca_dll_pll_c_aid_make_tracking_cc( float early_late_space_chips) { return glonass_l1_ca_dll_pll_c_aid_tracking_cc_sptr(new glonass_l1_ca_dll_pll_c_aid_tracking_cc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -94,7 +95,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pm DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) //avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(msg); + d_preamble_timestamp_s = pmt::to_double(std::move(msg)); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -125,7 +126,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_cc::glonass_l1_ca_dll_pll_c_aid_tracking_cc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== 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 8ae156483..5a1d08090 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 @@ -53,6 +53,7 @@ #include #include #include +#include #define CN0_ESTIMATION_SAMPLES 10 @@ -72,7 +73,7 @@ glonass_l1_ca_dll_pll_c_aid_make_tracking_sc( float early_late_space_chips) { return glonass_l1_ca_dll_pll_c_aid_tracking_sc_sptr(new glonass_l1_ca_dll_pll_c_aid_tracking_sc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -92,7 +93,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pm DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) //avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(msg); + d_preamble_timestamp_s = pmt::to_double(std::move(msg)); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -120,7 +121,7 @@ glonass_l1_ca_dll_pll_c_aid_tracking_sc::glonass_l1_ca_dll_pll_c_aid_tracking_sc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== 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 a56313e98..52e612164 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 @@ -52,6 +52,7 @@ #include #include #include +#include #define CN0_ESTIMATION_SAMPLES 10 @@ -68,7 +69,7 @@ glonass_l1_ca_dll_pll_make_tracking_cc( float early_late_space_chips) { return glonass_l1_ca_dll_pll_tracking_cc_sptr(new Glonass_L1_Ca_Dll_Pll_Tracking_cc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, early_late_space_chips)); } @@ -98,7 +99,7 @@ Glonass_L1_Ca_Dll_Pll_Tracking_cc::Glonass_L1_Ca_Dll_Pll_Tracking_cc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_current_prn_length_samples = static_cast(d_vector_length); 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 6cecd8e09..e5aacb3bf 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 @@ -52,6 +52,7 @@ #include #include #include +#include #define CN0_ESTIMATION_SAMPLES 10 @@ -71,7 +72,7 @@ glonass_l2_ca_dll_pll_c_aid_make_tracking_cc( float early_late_space_chips) { return glonass_l2_ca_dll_pll_c_aid_tracking_cc_sptr(new glonass_l2_ca_dll_pll_c_aid_tracking_cc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -91,7 +92,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pm DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) //avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(msg); + d_preamble_timestamp_s = pmt::to_double(std::move(msg)); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -122,7 +123,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_cc::glonass_l2_ca_dll_pll_c_aid_tracking_cc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== 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 d0d3a631b..7f2a5fac1 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 @@ -51,6 +51,7 @@ #include #include #include +#include #define CN0_ESTIMATION_SAMPLES 10 @@ -70,7 +71,7 @@ glonass_l2_ca_dll_pll_c_aid_make_tracking_sc( float early_late_space_chips) { return glonass_l2_ca_dll_pll_c_aid_tracking_sc_sptr(new glonass_l2_ca_dll_pll_c_aid_tracking_sc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -90,7 +91,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pm DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) //avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(msg); + d_preamble_timestamp_s = pmt::to_double(std::move(msg)); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -119,7 +120,7 @@ glonass_l2_ca_dll_pll_c_aid_tracking_sc::glonass_l2_ca_dll_pll_c_aid_tracking_sc d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== 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 d5b264e5c..b3e14d11f 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 @@ -52,6 +52,7 @@ #include #include #include +#include #define CN0_ESTIMATION_SAMPLES 10 @@ -68,7 +69,7 @@ glonass_l2_ca_dll_pll_make_tracking_cc( float early_late_space_chips) { return glonass_l2_ca_dll_pll_tracking_cc_sptr(new Glonass_L2_Ca_Dll_Pll_Tracking_cc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, early_late_space_chips)); } @@ -98,7 +99,7 @@ Glonass_L2_Ca_Dll_Pll_Tracking_cc::Glonass_L2_Ca_Dll_Pll_Tracking_cc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_current_prn_length_samples = static_cast(d_vector_length); diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc index 420be4dfb..8ce7d3d09 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -45,6 +45,7 @@ #include #include #include +#include using google::LogMessage; @@ -63,7 +64,7 @@ gps_l1_ca_dll_pll_c_aid_make_tracking_cc( float early_late_space_chips) { return gps_l1_ca_dll_pll_c_aid_tracking_cc_sptr(new gps_l1_ca_dll_pll_c_aid_tracking_cc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -83,7 +84,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_cc::msg_handler_preamble_index(pmt::pmt_t DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) //avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(msg); + d_preamble_timestamp_s = pmt::to_double(std::move(msg)); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -114,7 +115,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_cc::gps_l1_ca_dll_pll_c_aid_tracking_cc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc index 84e058d4c..2a541fabd 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -45,6 +45,7 @@ #include #include #include +#include using google::LogMessage; @@ -63,7 +64,7 @@ gps_l1_ca_dll_pll_c_aid_make_tracking_sc( float early_late_space_chips) { return gps_l1_ca_dll_pll_c_aid_tracking_sc_sptr(new gps_l1_ca_dll_pll_c_aid_tracking_sc( - fs_in, vector_length, dump, dump_filename, pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); + fs_in, vector_length, dump, std::move(dump_filename), pll_bw_hz, dll_bw_hz, pll_bw_narrow_hz, dll_bw_narrow_hz, extend_correlation_ms, early_late_space_chips)); } @@ -83,7 +84,7 @@ void gps_l1_ca_dll_pll_c_aid_tracking_sc::msg_handler_preamble_index(pmt::pmt_t DLOG(INFO) << "Extended correlation enabled for Tracking CH " << d_channel << ": Satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN); if (d_enable_extended_integration == false) //avoid re-setting preamble indicator { - d_preamble_timestamp_s = pmt::to_double(msg); + d_preamble_timestamp_s = pmt::to_double(std::move(msg)); d_enable_extended_integration = true; d_preamble_synchronized = false; } @@ -111,7 +112,7 @@ gps_l1_ca_dll_pll_c_aid_tracking_sc::gps_l1_ca_dll_pll_c_aid_tracking_sc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_correlation_length_samples = static_cast(d_vector_length); // Initialize tracking ========================================== diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc index 70f754208..28148a004 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_kf_tracking_cc.cc @@ -53,6 +53,7 @@ #include #include #include +#include using google::LogMessage; @@ -74,7 +75,7 @@ gps_l1_ca_kf_make_tracking_cc( int32_t bce_kappa) { return gps_l1_ca_kf_tracking_cc_sptr(new Gps_L1_Ca_Kf_Tracking_cc(order, if_freq, - fs_in, vector_length, dump, dump_filename, dll_bw_hz, early_late_space_chips, + fs_in, vector_length, dump, std::move(dump_filename), dll_bw_hz, early_late_space_chips, bce_run, bce_ptrans, bce_strans, bce_nu, bce_kappa)); } @@ -115,7 +116,7 @@ Gps_L1_Ca_Kf_Tracking_cc::Gps_L1_Ca_Kf_Tracking_cc( d_if_freq = if_freq; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); d_current_prn_length_samples = static_cast(d_vector_length); 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 44d83aade..7875a2bbc 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 @@ -52,6 +52,7 @@ #include #include #include +#include using google::LogMessage; @@ -61,7 +62,7 @@ gps_l1_ca_tcp_connector_make_tracking_cc( int64_t fs_in, uint32_t vector_length, bool dump, - std::string dump_filename, + const std::string& dump_filename, float early_late_space_chips, size_t port_ch0) { @@ -94,7 +95,7 @@ Gps_L1_Ca_Tcp_Connector_Tracking_cc::Gps_L1_Ca_Tcp_Connector_Tracking_cc( d_dump = dump; d_fs_in = fs_in; d_vector_length = vector_length; - d_dump_filename = dump_filename; + d_dump_filename = std::move(dump_filename); //--- DLL variables -------------------------------------------------------- d_early_late_spc_chips = early_late_space_chips; // Define early-late offset (in chips) diff --git a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h index f946ed0c8..91bdb0890 100644 --- a/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h +++ b/src/algorithms/tracking/gnuradio_blocks/gps_l1_ca_tcp_connector_tracking_cc.h @@ -54,7 +54,7 @@ gps_l1_ca_tcp_connector_tracking_cc_sptr gps_l1_ca_tcp_connector_make_tracking_cc( int64_t fs_in, uint32_t vector_length, bool dump, - std::string dump_filename, + const std::string& dump_filename, float early_late_space_chips, size_t port_ch0); @@ -86,7 +86,7 @@ private: gps_l1_ca_tcp_connector_make_tracking_cc( int64_t fs_in, uint32_t vector_length, bool dump, - std::string dump_filename, + const std::string& dump_filename, float early_late_space_chips, size_t port_ch0); diff --git a/src/core/libs/INIReader.cc b/src/core/libs/INIReader.cc index bd5ffe297..9589365bb 100644 --- a/src/core/libs/INIReader.cc +++ b/src/core/libs/INIReader.cc @@ -49,9 +49,10 @@ #include "ini.h" #include // for tolower #include // for stro +#include -INIReader::INIReader(std::string filename) +INIReader::INIReader(const std::string& filename) { _error = ini_parse(filename.c_str(), ValueHandler, this); } @@ -65,14 +66,14 @@ int INIReader::ParseError() std::string INIReader::Get(std::string section, std::string name, std::string default_value) { - std::string key = MakeKey(section, name); + std::string key = MakeKey(std::move(section), std::move(name)); return _values.count(key) ? _values[key] : default_value; } int64_t INIReader::GetInteger(std::string section, std::string name, int64_t default_value) { - std::string valstr = Get(section, name, ""); + std::string valstr = Get(std::move(section), std::move(name), ""); const char* value = valstr.c_str(); char* end; // This parses "1234" (decimal) and also "0x4D2" (hex) @@ -81,7 +82,7 @@ int64_t INIReader::GetInteger(std::string section, std::string name, int64_t def } -std::string INIReader::MakeKey(std::string section, std::string name) +std::string INIReader::MakeKey(const std::string& section, const std::string& name) { std::string key = section + "." + name; // Convert to lower case to make lookups case-insensitive diff --git a/src/core/libs/INIReader.h b/src/core/libs/INIReader.h index 0680cb89e..53a8afb08 100644 --- a/src/core/libs/INIReader.h +++ b/src/core/libs/INIReader.h @@ -60,7 +60,7 @@ class INIReader { public: //! Construct INIReader and parse given filename. See ini.h for more info about the parsing. - INIReader(std::string filename); + INIReader(const std::string& filename); //! Return the result of ini_parse(), i.e., 0 on success, line number of first error on parse error, or -1 on file open error. int ParseError(); @@ -75,7 +75,7 @@ public: private: int _error; std::map _values; - static std::string MakeKey(std::string section, std::string name); + static std::string MakeKey(const std::string& section, const std::string& name); static int ValueHandler(void* user, const char* section, const char* name, const char* value); }; diff --git a/src/core/libs/gnss_sdr_supl_client.cc b/src/core/libs/gnss_sdr_supl_client.cc index 33bf51a47..46b0b0031 100644 --- a/src/core/libs/gnss_sdr_supl_client.cc +++ b/src/core/libs/gnss_sdr_supl_client.cc @@ -369,7 +369,7 @@ void gnss_sdr_supl_client::read_supl_data() } -bool gnss_sdr_supl_client::load_ephemeris_xml(const std::string file_name) +bool gnss_sdr_supl_client::load_ephemeris_xml(const std::string& file_name) { std::ifstream ifs; try @@ -389,7 +389,7 @@ bool gnss_sdr_supl_client::load_ephemeris_xml(const std::string file_name) } -bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string file_name, std::map eph_map) +bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string& file_name, std::map eph_map) { if (eph_map.empty() == false) { @@ -416,7 +416,7 @@ bool gnss_sdr_supl_client::save_ephemeris_map_xml(const std::string file_name, s } -bool gnss_sdr_supl_client::load_gal_ephemeris_xml(const std::string file_name) +bool gnss_sdr_supl_client::load_gal_ephemeris_xml(const std::string& file_name) { std::ifstream ifs; try @@ -436,7 +436,7 @@ bool gnss_sdr_supl_client::load_gal_ephemeris_xml(const std::string file_name) } -bool save_gal_ephemeris_map_xml(const std::string file_name, std::map eph_map) +bool save_gal_ephemeris_map_xml(const std::string& file_name, std::map eph_map) { if (eph_map.empty() == false) { @@ -463,7 +463,7 @@ bool save_gal_ephemeris_map_xml(const std::string file_name, std::map eph_map) +bool save_cnav_ephemeris_map_xml(const std::string& file_name, std::map eph_map) { if (eph_map.empty() == false) { @@ -510,7 +510,7 @@ bool save_cnav_ephemeris_map_xml(const std::string file_name, std::map eph_map) +bool save_gnav_ephemeris_map_xml(const std::string& file_name, std::map eph_map) { if (eph_map.empty() == false) { @@ -557,7 +557,7 @@ bool save_gnav_ephemeris_map_xml(const std::string file_name, std::map gps_almanac_map) +bool gnss_sdr_supl_client::save_gps_almanac_xml(const std::string& file_name, std::map gps_almanac_map) { if (gps_almanac_map.empty() == false) { @@ -834,7 +834,7 @@ bool gnss_sdr_supl_client::save_gps_almanac_xml(const std::string file_name, std } -bool gnss_sdr_supl_client::load_gal_almanac_xml(const std::string file_name) +bool gnss_sdr_supl_client::load_gal_almanac_xml(const std::string& file_name) { std::ifstream ifs; try @@ -854,7 +854,7 @@ bool gnss_sdr_supl_client::load_gal_almanac_xml(const std::string file_name) } -bool gnss_sdr_supl_client::read_gal_almanac_from_gsa(const std::string file_name) +bool gnss_sdr_supl_client::read_gal_almanac_from_gsa(const std::string& file_name) { pugi::xml_document doc; pugi::xml_parse_result result = doc.load_file(file_name.c_str()); @@ -904,7 +904,7 @@ bool gnss_sdr_supl_client::read_gal_almanac_from_gsa(const std::string file_name } -bool gnss_sdr_supl_client::save_gal_almanac_xml(const std::string file_name, std::map gal_almanac_map) +bool gnss_sdr_supl_client::save_gal_almanac_xml(const std::string& file_name, std::map gal_almanac_map) { if (gal_almanac_map.empty() == false) { @@ -931,7 +931,7 @@ bool gnss_sdr_supl_client::save_gal_almanac_xml(const std::string file_name, std } -bool gnss_sdr_supl_client::load_glo_utc_xml(const std::string file_name) +bool gnss_sdr_supl_client::load_glo_utc_xml(const std::string& file_name) { std::ifstream ifs; try @@ -950,7 +950,7 @@ bool gnss_sdr_supl_client::load_glo_utc_xml(const std::string file_name) } -bool gnss_sdr_supl_client::save_glo_utc_xml(const std::string file_name, Glonass_Gnav_Utc_Model& utc) +bool gnss_sdr_supl_client::save_glo_utc_xml(const std::string& file_name, Glonass_Gnav_Utc_Model& utc) { if (utc.valid) { @@ -977,7 +977,7 @@ bool gnss_sdr_supl_client::save_glo_utc_xml(const std::string file_name, Glonass } -bool gnss_sdr_supl_client::load_ref_time_xml(const std::string file_name) +bool gnss_sdr_supl_client::load_ref_time_xml(const std::string& file_name) { std::ifstream ifs; try @@ -996,7 +996,7 @@ bool gnss_sdr_supl_client::load_ref_time_xml(const std::string file_name) } -bool gnss_sdr_supl_client::save_ref_time_xml(const std::string file_name, Agnss_Ref_Time& ref_time) +bool gnss_sdr_supl_client::save_ref_time_xml(const std::string& file_name, Agnss_Ref_Time& ref_time) { if (ref_time.valid == true) { @@ -1023,7 +1023,7 @@ bool gnss_sdr_supl_client::save_ref_time_xml(const std::string file_name, Agnss_ } -bool gnss_sdr_supl_client::load_ref_location_xml(const std::string file_name) +bool gnss_sdr_supl_client::load_ref_location_xml(const std::string& file_name) { std::ifstream ifs; try @@ -1042,7 +1042,7 @@ bool gnss_sdr_supl_client::load_ref_location_xml(const std::string file_name) } -bool gnss_sdr_supl_client::save_ref_location_xml(const std::string file_name, Agnss_Ref_Location& ref_location) +bool gnss_sdr_supl_client::save_ref_location_xml(const std::string& file_name, Agnss_Ref_Location& ref_location) { if (ref_location.valid == true) { diff --git a/src/core/libs/gnss_sdr_supl_client.h b/src/core/libs/gnss_sdr_supl_client.h index 2fd599bdf..d25df206a 100644 --- a/src/core/libs/gnss_sdr_supl_client.h +++ b/src/core/libs/gnss_sdr_supl_client.h @@ -77,7 +77,7 @@ private: supl_ctx_t ctx; // assistance data supl_assist_t assist; - bool read_gal_almanac_from_gsa(const std::string file_name); + bool read_gal_almanac_from_gsa(const std::string& file_name); public: // SUPL SERVER INFO @@ -127,18 +127,18 @@ public: /*! * \brief Read GPS NAV ephemeris map from XML file */ - bool load_ephemeris_xml(const std::string file_name); + bool load_ephemeris_xml(const std::string& file_name); /*! * \brief Save ephemeris map to XML file. */ - bool save_ephemeris_map_xml(const std::string file_name, + bool save_ephemeris_map_xml(const std::string& file_name, std::map eph_map); /*! * \brief Read GPS CNAV ephemeris map from XML file */ - bool load_cnav_ephemeris_xml(const std::string file_name); + bool load_cnav_ephemeris_xml(const std::string& file_name); /*! * \brief Save GPS CNAV ephemeris map to XML file. @@ -149,7 +149,7 @@ public: /*! * \brief Read Galileo ephemeris map from XML file */ - bool load_gal_ephemeris_xml(const std::string file_name); + bool load_gal_ephemeris_xml(const std::string& file_name); /*! * \brief Save Galileo ephemeris map to XML file. @@ -160,7 +160,7 @@ public: /*! * \brief Read GLONASS GNAV ephemeris map from XML file */ - bool load_gnav_ephemeris_xml(const std::string file_name); + bool load_gnav_ephemeris_xml(const std::string& file_name); /*! * \brief Save GLONASS GNAV ephemeris map to XML file. @@ -171,103 +171,103 @@ public: /*! * \brief Read GPS utc model from XML file */ - bool load_utc_xml(const std::string file_name); + bool load_utc_xml(const std::string& file_name); /*! * \brief Save UTC model map to XML file */ - bool save_utc_xml(const std::string file_name, Gps_Utc_Model& utc); + bool save_utc_xml(const std::string& file_name, Gps_Utc_Model& utc); /*! * \brief Read CNAV GPS utc model from XML file */ - bool load_cnav_utc_xml(const std::string file_name); + bool load_cnav_utc_xml(const std::string& file_name); /*! * \brief Save CNAV UTC model map to XML file */ - bool save_cnav_utc_xml(const std::string file_name, Gps_CNAV_Utc_Model& utc); + bool save_cnav_utc_xml(const std::string& file_name, Gps_CNAV_Utc_Model& utc); /*! * \brief Read Galileo utc model from XML file */ - bool load_gal_utc_xml(const std::string file_name); + bool load_gal_utc_xml(const std::string& file_name); /*! * \brief Save Galileo UTC model map to XML file */ - bool save_gal_utc_xml(const std::string file_name, Galileo_Utc_Model& utc); + bool save_gal_utc_xml(const std::string& file_name, Galileo_Utc_Model& utc); /*! * \brief Read Galileo almanac map from XML file */ - bool load_gal_almanac_xml(const std::string file_name); + bool load_gal_almanac_xml(const std::string& file_name); /*! * \brief Save Galileo almanac map to XML file */ - bool save_gal_almanac_xml(const std::string file_name, std::map gal_almanac); + bool save_gal_almanac_xml(const std::string& file_name, std::map gal_almanac); /*! * \brief Read GPS almanac map from XML file */ - bool load_gps_almanac_xml(const std::string file_name); + bool load_gps_almanac_xml(const std::string& file_name); /*! * \brief Save GPS almanac map to XML file */ - bool save_gps_almanac_xml(const std::string file_name, std::map gps_almanac_map); + bool save_gps_almanac_xml(const std::string& file_name, std::map gps_almanac_map); /*! * \brief Read iono from XML file */ - bool load_iono_xml(const std::string file_name); + bool load_iono_xml(const std::string& file_name); /*! * \brief Save iono map to XML file */ - bool save_iono_xml(const std::string file_name, Gps_Iono& iono); + bool save_iono_xml(const std::string& file_name, Gps_Iono& iono); /*! * \brief Read Galileo iono from XML file */ - bool load_gal_iono_xml(const std::string file_name); + bool load_gal_iono_xml(const std::string& file_name); /*! * \brief Save Galileo iono map to XML file */ - bool save_gal_iono_xml(const std::string file_name, Galileo_Iono& iono); + bool save_gal_iono_xml(const std::string& file_name, Galileo_Iono& iono); /*! * \brief Read Glonass utc model from XML file */ - bool load_glo_utc_xml(const std::string file_name); + bool load_glo_utc_xml(const std::string& file_name); /*! * \brief Save Glonass UTC model map to XML file */ - bool save_glo_utc_xml(const std::string file_name, Glonass_Gnav_Utc_Model& utc); + bool save_glo_utc_xml(const std::string& file_name, Glonass_Gnav_Utc_Model& utc); /*! * \brief Read ref time from XML file */ - bool load_ref_time_xml(const std::string file_name); + bool load_ref_time_xml(const std::string& file_name); /*! * \brief Save ref time map to XML file */ - bool save_ref_time_xml(const std::string file_name, + bool save_ref_time_xml(const std::string& file_name, Agnss_Ref_Time& ref_time_map); /*! * \brief Read ref location from XML file */ - bool load_ref_location_xml(const std::string file_name); + bool load_ref_location_xml(const std::string& file_name); /*! * \brief Save ref location map to XML file */ - bool save_ref_location_xml(std::string file_name, + bool save_ref_location_xml(const std::string& file_name, Agnss_Ref_Location& ref_location); /* diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index bb27826bb..5131dadf2 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -800,7 +800,7 @@ void GNSSFlowgraph::wait() } -bool GNSSFlowgraph::send_telemetry_msg(pmt::pmt_t msg) +bool GNSSFlowgraph::send_telemetry_msg(const pmt::pmt_t& msg) { // Push ephemeris to PVT telemetry msg in port using a channel out port // it uses the first channel as a message producer (it is already connected to PVT) diff --git a/src/core/receiver/gnss_flowgraph.h b/src/core/receiver/gnss_flowgraph.h index b279f6f67..6ad1063ea 100644 --- a/src/core/receiver/gnss_flowgraph.h +++ b/src/core/receiver/gnss_flowgraph.h @@ -128,7 +128,7 @@ public: * * It is used to assist the receiver with external ephemeris data */ - bool send_telemetry_msg(pmt::pmt_t msg); + bool send_telemetry_msg(const pmt::pmt_t& msg); /*! * \brief Returns a smart pointer to the PVT object diff --git a/src/core/system_parameters/glonass_gnav_navigation_message.cc b/src/core/system_parameters/glonass_gnav_navigation_message.cc index 963c44b33..005e14597 100644 --- a/src/core/system_parameters/glonass_gnav_navigation_message.cc +++ b/src/core/system_parameters/glonass_gnav_navigation_message.cc @@ -212,7 +212,7 @@ bool Glonass_Gnav_Navigation_Message::CRC_test(std::bitset bits, const std::vector> parameter) +bool Glonass_Gnav_Navigation_Message::read_navigation_bool(std::bitset bits, const std::vector>& parameter) { bool value; @@ -228,7 +228,7 @@ bool Glonass_Gnav_Navigation_Message::read_navigation_bool(std::bitset bits, const std::vector> parameter) +uint64_t Glonass_Gnav_Navigation_Message::read_navigation_unsigned(std::bitset bits, const std::vector>& parameter) { uint64_t value = 0ULL; int32_t num_of_slices = parameter.size(); @@ -247,7 +247,7 @@ uint64_t Glonass_Gnav_Navigation_Message::read_navigation_unsigned(std::bitset bits, const std::vector> parameter) +int64_t Glonass_Gnav_Navigation_Message::read_navigation_signed(std::bitset bits, const std::vector>& parameter) { int64_t value = 0LL; int64_t sign = 0LL; @@ -310,7 +310,7 @@ uint32_t Glonass_Gnav_Navigation_Message::get_frame_number(uint32_t satellite_sl } -int32_t Glonass_Gnav_Navigation_Message::string_decoder(std::string frame_string) +int32_t Glonass_Gnav_Navigation_Message::string_decoder(const std::string& frame_string) { int32_t J = 0; d_string_ID = 0U; diff --git a/src/core/system_parameters/glonass_gnav_navigation_message.h b/src/core/system_parameters/glonass_gnav_navigation_message.h index e13f41511..58b060518 100644 --- a/src/core/system_parameters/glonass_gnav_navigation_message.h +++ b/src/core/system_parameters/glonass_gnav_navigation_message.h @@ -51,9 +51,9 @@ class Glonass_Gnav_Navigation_Message { private: - uint64_t read_navigation_unsigned(std::bitset bits, const std::vector> parameter); - int64_t read_navigation_signed(std::bitset bits, const std::vector> parameter); - bool read_navigation_bool(std::bitset bits, const std::vector> parameter); + uint64_t read_navigation_unsigned(std::bitset bits, const std::vector>& parameter); + int64_t read_navigation_signed(std::bitset bits, const std::vector>& parameter); + bool read_navigation_bool(std::bitset bits, const std::vector>& parameter); public: bool flag_CRC_test; @@ -159,7 +159,7 @@ public: * \param frame_string [in] is the string message within the parsed frame * \returns Returns the ID of the decoded string */ - int32_t string_decoder(std::string frame_string); + int32_t string_decoder(const std::string& frame_string); /*! * Default constructor diff --git a/src/tests/system-tests/libs/rtklib_solver_dump_reader.cc b/src/tests/system-tests/libs/rtklib_solver_dump_reader.cc index b32f12bc5..77be01cd8 100644 --- a/src/tests/system-tests/libs/rtklib_solver_dump_reader.cc +++ b/src/tests/system-tests/libs/rtklib_solver_dump_reader.cc @@ -30,6 +30,7 @@ #include "rtklib_solver_dump_reader.h" #include +#include bool rtklib_solver_dump_reader::read_binary_obs() { @@ -111,7 +112,7 @@ bool rtklib_solver_dump_reader::open_obs_file(std::string out_file) { try { - d_dump_filename = out_file; + d_dump_filename = std::move(out_file); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.open(d_dump_filename.c_str(), std::ios::in | std::ios::binary); return true; diff --git a/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.cc b/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.cc index 15cd3335d..b93f6e511 100644 --- a/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.cc +++ b/src/tests/system-tests/libs/spirent_motion_csv_dump_reader.cc @@ -31,6 +31,7 @@ #include "spirent_motion_csv_dump_reader.h" #include #include +#include spirent_motion_csv_dump_reader::spirent_motion_csv_dump_reader() @@ -218,7 +219,7 @@ bool spirent_motion_csv_dump_reader::open_obs_file(std::string out_file) { try { - d_dump_filename = out_file; + d_dump_filename = std::move(out_file); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.open(d_dump_filename.c_str()); std::string line; diff --git a/src/tests/system-tests/position_test.cc b/src/tests/system-tests/position_test.cc index f030130e1..e5efd2150 100644 --- a/src/tests/system-tests/position_test.cc +++ b/src/tests/system-tests/position_test.cc @@ -87,7 +87,7 @@ private: std::string filename_rinex_obs = FLAGS_filename_rinex_obs; std::string filename_raw_data = FLAGS_filename_raw_data; - void print_results(arma::mat R_eb_enu); + void print_results(const arma::mat& R_eb_enu); std::shared_ptr config; std::shared_ptr config_f; std::string generated_kml_file; @@ -782,7 +782,7 @@ void PositionSystemTest::check_results() } -void PositionSystemTest::print_results(arma::mat R_eb_enu) +void PositionSystemTest::print_results(const arma::mat& R_eb_enu) { const std::string gnuplot_executable(FLAGS_gnuplot_executable); if (gnuplot_executable.empty()) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc index 6c9abaaa9..624e02bd5 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_acquisition_test.cc @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -88,7 +89,7 @@ void GpsL1CaPcpsAcquisitionTest_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - int64_t message = pmt::to_long(msg); + int64_t message = pmt::to_long(std::move(msg)); rx_message = message; } catch (boost::bad_any_cast &e) @@ -198,7 +199,7 @@ void GpsL1CaPcpsAcquisitionTest::plot_grid() { boost::filesystem::path p(gnuplot_executable); boost::filesystem::path dir = p.parent_path(); - std::string gnuplot_path = dir.native(); + const std::string& gnuplot_path = dir.native(); Gnuplot::set_GNUPlotPath(gnuplot_path); Gnuplot g1("lines"); diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc index c15db4f01..dc5a7a40b 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/acquisition_msg_rx.cc @@ -33,6 +33,7 @@ #include "acquisition_msg_rx.h" #include #include +#include #include #include @@ -47,7 +48,7 @@ void Acquisition_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - int64_t message = pmt::to_long(msg); + int64_t message = pmt::to_long(std::move(msg)); rx_message = message; top_block->stop(); // stop the flowgraph } diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc index 08f891810..1a6a19278 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/observables_dump_reader.cc @@ -30,6 +30,7 @@ #include "observables_dump_reader.h" #include +#include bool observables_dump_reader::read_binary_obs() { @@ -94,7 +95,7 @@ bool observables_dump_reader::open_obs_file(std::string out_file) { try { - d_dump_filename = out_file; + d_dump_filename = std::move(out_file); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.open(d_dump_filename.c_str(), std::ios::in | std::ios::binary); return true; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc index 64508e56e..2159b0e34 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tlm_dump_reader.cc @@ -30,6 +30,7 @@ #include "tlm_dump_reader.h" #include +#include bool tlm_dump_reader::read_binary_obs() { @@ -87,7 +88,7 @@ bool tlm_dump_reader::open_obs_file(std::string out_file) { try { - d_dump_filename = out_file; + d_dump_filename = std::move(out_file); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.open(d_dump_filename.c_str(), std::ios::in | std::ios::binary); std::cout << "TLM dump enabled, Log file: " << d_dump_filename.c_str() << std::endl; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc index 5ed6a0fec..701df393c 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_dump_reader.cc @@ -30,6 +30,7 @@ #include "tracking_dump_reader.h" #include +#include bool tracking_dump_reader::read_binary_obs() { @@ -108,7 +109,7 @@ bool tracking_dump_reader::open_obs_file(std::string out_file) { try { - d_dump_filename = out_file; + d_dump_filename = std::move(out_file); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.open(d_dump_filename.c_str(), std::ios::in | std::ios::binary); return true; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc index 2c03737cd..df51a8baa 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/tracking_true_obs_reader.cc @@ -30,6 +30,7 @@ #include "tracking_true_obs_reader.h" #include +#include bool tracking_true_obs_reader::read_binary_obs() { @@ -90,7 +91,7 @@ bool tracking_true_obs_reader::open_obs_file(std::string out_file) try { d_dump_file.clear(); - d_dump_filename = out_file; + d_dump_filename = std::move(out_file); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.open(d_dump_filename.c_str(), std::ios::in | std::ios::binary); return true; diff --git a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc index f662f76dc..396c41401 100644 --- a/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc +++ b/src/tests/unit-tests/signal-processing-blocks/libs/true_observables_reader.cc @@ -30,6 +30,7 @@ #include "true_observables_reader.h" #include +#include bool true_observables_reader::read_binary_obs() { @@ -94,7 +95,7 @@ bool true_observables_reader::open_obs_file(std::string out_file) { try { - d_dump_filename = out_file; + d_dump_filename = std::move(out_file); d_dump_file.exceptions(std::ifstream::failbit | std::ifstream::badbit); d_dump_file.open(d_dump_filename.c_str(), std::ios::in | std::ios::binary); std::cout << "True observables Log file opened: " << d_dump_filename.c_str() << std::endl; diff --git a/src/utils/front-end-cal/front_end_cal.cc b/src/utils/front-end-cal/front_end_cal.cc index a9ec8be37..c0ba4ea15 100644 --- a/src/utils/front-end-cal/front_end_cal.cc +++ b/src/utils/front-end-cal/front_end_cal.cc @@ -38,6 +38,7 @@ #include #include #include +#include #include "gps_navigation_message.h" #include "gps_ephemeris.h" #include "gps_cnav_ephemeris.h" @@ -235,7 +236,7 @@ int FrontEndCal::Get_SUPL_Assist() void FrontEndCal::set_configuration(std::shared_ptr configuration) { - configuration_ = configuration; + configuration_ = std::move(configuration); } diff --git a/src/utils/front-end-cal/main.cc b/src/utils/front-end-cal/main.cc index 36ccf45e5..a826331c6 100644 --- a/src/utils/front-end-cal/main.cc +++ b/src/utils/front-end-cal/main.cc @@ -73,6 +73,7 @@ #include #include #include +#include #include @@ -124,7 +125,7 @@ void FrontEndCal_msg_rx::msg_handler_events(pmt::pmt_t msg) { try { - int64_t message = pmt::to_long(msg); + int64_t message = pmt::to_long(std::move(msg)); rx_message = message; channel_internal_queue.push(rx_message); } @@ -173,7 +174,7 @@ void wait_message() } -bool front_end_capture(std::shared_ptr configuration) +bool front_end_capture(const std::shared_ptr& configuration) { gr::top_block_sptr top_block; GNSSBlockFactory block_factory;