1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-10-25 20:47:39 +00:00

Improve performance by using const and std::move() to avoid unnecessary copies

This commit is contained in:
Carles Fernandez
2018-12-03 19:01:47 +01:00
parent 2709dc5ec7
commit 1743a773b5
136 changed files with 309 additions and 268 deletions

View File

@@ -56,14 +56,14 @@ gnss_sdr_valve::gnss_sdr_valve(size_t sizeof_stream_item,
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, unsigned long long nitems, gr::msg_queue::sptr queue, bool stop_flowgraph)
{
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, stop_flowgraph));
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), stop_flowgraph));
return valve_;
}
boost::shared_ptr<gr::block> gnss_sdr_make_valve(size_t sizeof_stream_item, unsigned long long nitems, gr::msg_queue::sptr queue)
{
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, queue, true));
boost::shared_ptr<gnss_sdr_valve> valve_(new gnss_sdr_valve(sizeof_stream_item, nitems, std::move(queue), true));
return valve_;
}

View File

@@ -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),

View File

@@ -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);