diff --git a/src/algorithms/PVT/libs/monitor_pvt_udp_sink.cc b/src/algorithms/PVT/libs/monitor_pvt_udp_sink.cc index baa85692d..0e962207b 100644 --- a/src/algorithms/PVT/libs/monitor_pvt_udp_sink.cc +++ b/src/algorithms/PVT/libs/monitor_pvt_udp_sink.cc @@ -35,7 +35,7 @@ #include -Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(std::vector addresses, const uint16_t& port, bool protobuf_enabled) : socket{io_context} +Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(const std::vector& addresses, const uint16_t& port, bool protobuf_enabled) : socket{io_context} { for (const auto& address : addresses) { diff --git a/src/algorithms/PVT/libs/monitor_pvt_udp_sink.h b/src/algorithms/PVT/libs/monitor_pvt_udp_sink.h index c8c363942..85a612358 100644 --- a/src/algorithms/PVT/libs/monitor_pvt_udp_sink.h +++ b/src/algorithms/PVT/libs/monitor_pvt_udp_sink.h @@ -45,7 +45,7 @@ using b_io_context = boost::asio::io_service; class Monitor_Pvt_Udp_Sink { public: - Monitor_Pvt_Udp_Sink(std::vector addresses, const uint16_t &port, bool protobuf_enabled); + Monitor_Pvt_Udp_Sink(const std::vector& addresses, const uint16_t &port, bool protobuf_enabled); bool write_monitor_pvt(const Monitor_Pvt &monitor_pvt); private: diff --git a/src/algorithms/PVT/libs/nmea_printer.cc b/src/algorithms/PVT/libs/nmea_printer.cc index ecc92b914..913a23e39 100644 --- a/src/algorithms/PVT/libs/nmea_printer.cc +++ b/src/algorithms/PVT/libs/nmea_printer.cc @@ -283,7 +283,7 @@ bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr& pvt_dat } -char Nmea_Printer::checkSum(std::string sentence) +char Nmea_Printer::checkSum(const std::string& sentence) { char check = 0; // iterate over the string, XOR each byte with the total sum: diff --git a/src/algorithms/PVT/libs/nmea_printer.h b/src/algorithms/PVT/libs/nmea_printer.h index f821ad94b..d9822c6c5 100644 --- a/src/algorithms/PVT/libs/nmea_printer.h +++ b/src/algorithms/PVT/libs/nmea_printer.h @@ -83,7 +83,7 @@ private: std::string get_UTC_NMEA_time(boost::posix_time::ptime d_position_UTC_time); std::string longitude_to_hm(double longitude); std::string latitude_to_hm(double lat); - char checkSum(std::string sentence); + char checkSum(const std::string& sentence); bool print_avg_pos; bool d_flag_nmea_output_file; }; diff --git a/src/core/libs/INIReader.cc b/src/core/libs/INIReader.cc index 63c076b82..454986615 100644 --- a/src/core/libs/INIReader.cc +++ b/src/core/libs/INIReader.cc @@ -64,7 +64,7 @@ int INIReader::ParseError() } -std::string INIReader::Get(const std::string& section, const std::string& name, std::string default_value) +std::string INIReader::Get(const std::string& section, const std::string& name, const std::string& default_value) { std::string key = MakeKey(section, name); return _values.count(key) ? _values[key] : default_value; diff --git a/src/core/libs/INIReader.h b/src/core/libs/INIReader.h index bfe168bd9..1a9f0f3e5 100644 --- a/src/core/libs/INIReader.h +++ b/src/core/libs/INIReader.h @@ -67,7 +67,7 @@ public: //! Get a string value from INI file, returning default_value if not found. std::string Get(const std::string& section, const std::string& name, - std::string default_value); + const std::string& default_value); //! Get an integer (long) value from INI file, returning default_value if not found. int64_t GetInteger(const std::string& section, const std::string& name, int64_t default_value); diff --git a/src/core/monitor/gnss_synchro_udp_sink.cc b/src/core/monitor/gnss_synchro_udp_sink.cc index 5793358ac..5a412a593 100644 --- a/src/core/monitor/gnss_synchro_udp_sink.cc +++ b/src/core/monitor/gnss_synchro_udp_sink.cc @@ -35,7 +35,7 @@ #include #include -Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(std::vector addresses, const uint16_t& port, bool enable_protobuf) : socket{io_context} +Gnss_Synchro_Udp_Sink::Gnss_Synchro_Udp_Sink(const std::vector& addresses, const uint16_t& port, bool enable_protobuf) : socket{io_context} { use_protobuf = enable_protobuf; if (enable_protobuf) diff --git a/src/core/monitor/gnss_synchro_udp_sink.h b/src/core/monitor/gnss_synchro_udp_sink.h index 0cf4cc5cd..52c786885 100644 --- a/src/core/monitor/gnss_synchro_udp_sink.h +++ b/src/core/monitor/gnss_synchro_udp_sink.h @@ -53,7 +53,7 @@ using b_io_context = boost::asio::io_service; class Gnss_Synchro_Udp_Sink { public: - Gnss_Synchro_Udp_Sink(std::vector addresses, const uint16_t& port, bool enable_protobuf); + Gnss_Synchro_Udp_Sink(const std::vector& addresses, const uint16_t& port, bool enable_protobuf); bool write_gnss_synchro(const std::vector& stocks); private: diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 0611a4e26..1de87bc17 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -1511,7 +1511,7 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what) } -void GNSSFlowgraph::priorize_satellites(std::vector> visible_satellites) +void GNSSFlowgraph::priorize_satellites(const std::vector>& visible_satellites) { size_t old_size; Gnss_Signal gs; diff --git a/src/core/receiver/gnss_flowgraph.h b/src/core/receiver/gnss_flowgraph.h index 32e0ea2e3..7552c46a7 100644 --- a/src/core/receiver/gnss_flowgraph.h +++ b/src/core/receiver/gnss_flowgraph.h @@ -142,7 +142,7 @@ public: /*! * \brief Priorize visible satellites in the specified vector */ - void priorize_satellites(std::vector> visible_satellites); + void priorize_satellites(const std::vector>& visible_satellites); private: void init(); // Populates the SV PRN list available for acquisition and tracking diff --git a/src/core/receiver/in_memory_configuration.cc b/src/core/receiver/in_memory_configuration.cc index 4801d2eb2..c3c093104 100644 --- a/src/core/receiver/in_memory_configuration.cc +++ b/src/core/receiver/in_memory_configuration.cc @@ -128,7 +128,7 @@ void InMemoryConfiguration::set_property(std::string property_name, std::string } -void InMemoryConfiguration::supersede_property(std::string property_name, std::string value) +void InMemoryConfiguration::supersede_property(const std::string& property_name, const std::string& value) { properties_.erase(property_name); properties_.insert(std::make_pair(property_name, value)); diff --git a/src/core/receiver/in_memory_configuration.h b/src/core/receiver/in_memory_configuration.h index 698071a36..2201c0d61 100644 --- a/src/core/receiver/in_memory_configuration.h +++ b/src/core/receiver/in_memory_configuration.h @@ -66,7 +66,7 @@ public: float property(std::string property_name, float default_value); double property(std::string property_name, double default_value); void set_property(std::string property_name, std::string value); - void supersede_property(std::string property_name, std::string value); + void supersede_property(const std::string& property_name, const std::string& value); bool is_present(const std::string& property_name); private: