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:
parent
3bdc7b9f21
commit
7cdda8e0dc
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user