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:
@@ -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_;
|
||||
}
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user