mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-09-05 12:27:59 +00:00
fix: inappropriate move semantics in file_source_base
This commit is contained in:

committed by
Carles Fernandez

parent
2649056e17
commit
49e06dc9e3
@@ -203,14 +203,14 @@ void FileSourceBase::connect(gr::top_block_sptr top_block)
|
||||
// DUMP
|
||||
if (sink())
|
||||
{
|
||||
top_block->connect(std::move(output), 0, sink(), 0);
|
||||
top_block->connect(output, 0, sink(), 0);
|
||||
DLOG(INFO) << "connected output to file sink";
|
||||
}
|
||||
|
||||
// EXTRA DATA
|
||||
// SENSOR DATA
|
||||
if (sensor_data_source())
|
||||
{
|
||||
top_block->connect(std::move(output), 0, sensor_data_source(), 0);
|
||||
top_block->connect(output, 0, sensor_data_source(), 0);
|
||||
DLOG(INFO) << "connected output to sensor data source, which now becomes the new output";
|
||||
output = sensor_data_source();
|
||||
}
|
||||
@@ -259,15 +259,14 @@ void FileSourceBase::disconnect(gr::top_block_sptr top_block)
|
||||
// DUMP
|
||||
if (sink())
|
||||
{
|
||||
top_block->disconnect(std::move(output), 0, sink(), 0);
|
||||
top_block->disconnect(output, 0, sink(), 0);
|
||||
DLOG(INFO) << "disconnected output to file sink";
|
||||
}
|
||||
|
||||
// EXTRA DATA
|
||||
// SENSOR DATA
|
||||
if (sensor_data_source())
|
||||
{
|
||||
// TODO - FIXME: This is NOT okay, `output` is the extra data source, not the valve/source/throttle/whatever is left of this
|
||||
top_block->disconnect(std::move(output), 0, sensor_data_source(), 0);
|
||||
top_block->disconnect(output, 0, sensor_data_source(), 0);
|
||||
DLOG(INFO) << "disconnected output to extra data source";
|
||||
output = sensor_data_source();
|
||||
}
|
||||
|
Reference in New Issue
Block a user