mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	Avoid passing big parameters by value
clang-tidy check: performance-unnecessary-value-param See https://clang.llvm.org/extra/clang-tidy/checks/performance-unnecessary-value-param.html
This commit is contained in:
		| @@ -51,7 +51,7 @@ Monitor_Pvt_Udp_Sink::Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addre | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| bool Monitor_Pvt_Udp_Sink::write_monitor_pvt(std::shared_ptr<Monitor_Pvt> monitor_pvt) | bool Monitor_Pvt_Udp_Sink::write_monitor_pvt(const std::shared_ptr<Monitor_Pvt>& monitor_pvt) | ||||||
| { | { | ||||||
|     std::string outbound_data; |     std::string outbound_data; | ||||||
|     if (use_protobuf == false) |     if (use_protobuf == false) | ||||||
|   | |||||||
| @@ -46,7 +46,7 @@ class Monitor_Pvt_Udp_Sink | |||||||
| { | { | ||||||
| public: | public: | ||||||
|     Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port, bool protobuf_enabled); |     Monitor_Pvt_Udp_Sink(const std::vector<std::string>& addresses, const uint16_t& port, bool protobuf_enabled); | ||||||
|     bool write_monitor_pvt(std::shared_ptr<Monitor_Pvt> monitor_pvt); |     bool write_monitor_pvt(const std::shared_ptr<Monitor_Pvt>& monitor_pvt); | ||||||
|  |  | ||||||
| private: | private: | ||||||
|     b_io_context io_context; |     b_io_context io_context; | ||||||
|   | |||||||
| @@ -56,7 +56,7 @@ channel_status_msg_receiver::channel_status_msg_receiver() : gr::block("channel_ | |||||||
| channel_status_msg_receiver::~channel_status_msg_receiver() = default; | channel_status_msg_receiver::~channel_status_msg_receiver() = default; | ||||||
|  |  | ||||||
|  |  | ||||||
| void channel_status_msg_receiver::msg_handler_events(pmt::pmt_t msg) | void channel_status_msg_receiver::msg_handler_events(const pmt::pmt_t& msg) | ||||||
| { | { | ||||||
|     gr::thread::scoped_lock lock(d_setlock);  // require mutex with msg_handler_events function called by the scheduler |     gr::thread::scoped_lock lock(d_setlock);  // require mutex with msg_handler_events function called by the scheduler | ||||||
|     try |     try | ||||||
|   | |||||||
| @@ -65,7 +65,7 @@ private: | |||||||
|     std::map<int, std::shared_ptr<Gnss_Synchro>> d_channel_status_map; |     std::map<int, std::shared_ptr<Gnss_Synchro>> d_channel_status_map; | ||||||
|  |  | ||||||
|     Monitor_Pvt d_pvt_status{}; |     Monitor_Pvt d_pvt_status{}; | ||||||
|     void msg_handler_events(pmt::pmt_t msg); |     void msg_handler_events(const pmt::pmt_t& msg); | ||||||
| }; | }; | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -1063,7 +1063,7 @@ bool GNSSFlowgraph::send_telemetry_msg(const pmt::pmt_t& msg) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GNSSFlowgraph::push_back_signal(Gnss_Signal gs) | void GNSSFlowgraph::push_back_signal(const Gnss_Signal& gs) | ||||||
| { | { | ||||||
|     switch (mapStringValues_[gs.get_signal_str()]) |     switch (mapStringValues_[gs.get_signal_str()]) | ||||||
|         { |         { | ||||||
| @@ -1119,7 +1119,7 @@ void GNSSFlowgraph::push_back_signal(Gnss_Signal gs) | |||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void GNSSFlowgraph::remove_signal(Gnss_Signal gs) | void GNSSFlowgraph::remove_signal(const Gnss_Signal& gs) | ||||||
| { | { | ||||||
|     switch (mapStringValues_[gs.get_signal_str()]) |     switch (mapStringValues_[gs.get_signal_str()]) | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -111,8 +111,8 @@ public: | |||||||
|     void apply_action(unsigned int who, unsigned int what); |     void apply_action(unsigned int who, unsigned int what); | ||||||
|  |  | ||||||
|  |  | ||||||
|     void push_back_signal(Gnss_Signal gs); |     void push_back_signal(const Gnss_Signal& gs); | ||||||
|     void remove_signal(Gnss_Signal gs); |     void remove_signal(const Gnss_Signal& gs); | ||||||
|  |  | ||||||
|     void set_configuration(std::shared_ptr<ConfigurationInterface> configuration); |     void set_configuration(std::shared_ptr<ConfigurationInterface> configuration); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez