1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-10 20:10:05 +00:00

Simplified disconnect() function

We can disconnect the sources directly instead of disconnecting each of their outputs.
This commit is contained in:
Victor Castillo 2024-08-19 15:42:26 +02:00
parent 3bdc7b9f21
commit 7cdda8e0dc
No known key found for this signature in database
GPG Key ID: 8EF1FC8B7182F608

View File

@ -98,13 +98,9 @@ void IONGSMSSignalSource::connect(gr::top_block_sptr top_block)
void IONGSMSSignalSource::disconnect(gr::top_block_sptr top_block) void IONGSMSSignalSource::disconnect(gr::top_block_sptr top_block)
{ {
std::size_t cumulative_index = 0;
for (const auto& source : sources_) for (const auto& source : sources_)
{ {
for (std::size_t i = 0; i < source->output_stream_count(); ++i, ++cumulative_index) top_block->disconnect(source);
{
top_block->disconnect(source, i, copy_blocks_[cumulative_index], 0);
}
} }
} }