From 8702f9dfc7e889bef4f5e666a50630c1c0e6850b Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 22 Aug 2024 13:26:17 +0200 Subject: [PATCH] Put the global function into an anonymous namespace Use emplace_back instead of push_back --- .../signal_source/adapters/ion_gsms_signal_source.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc b/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc index 2def04c75..e4fef62a0 100644 --- a/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc +++ b/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc @@ -30,6 +30,8 @@ using namespace std::string_literals; +namespace +{ std::vector parse_comma_list(const std::string& str) { std::vector list{}; @@ -48,6 +50,7 @@ std::vector parse_comma_list(const std::string& str) return list; } +} // anonymous namespace IONGSMSSignalSource::IONGSMSSignalSource(const ConfigurationInterface* configuration, @@ -80,8 +83,8 @@ IONGSMSSignalSource::IONGSMSSignalSource(const ConfigurationInterface* configura { for (std::size_t i = 0; i < source->output_stream_count(); ++i) { - copy_blocks_.push_back(gr::blocks::copy::make(source->output_stream_item_size(i))); - valves_.push_back(gnss_sdr_make_valve(source->output_stream_item_size(i), source->output_stream_total_sample_count(i), queue)); + copy_blocks_.emplace_back(gr::blocks::copy::make(source->output_stream_item_size(i))); + valves_.emplace_back(gnss_sdr_make_valve(source->output_stream_item_size(i), source->output_stream_total_sample_count(i), queue)); } } }