1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-09-11 15:26:02 +00:00

fix: inappropriate move semantics in file_source_base

This commit is contained in:
Victor Castillo
2025-06-10 12:29:11 +02:00
committed by Carles Fernandez
parent 2649056e17
commit 49e06dc9e3

View File

@@ -203,14 +203,14 @@ void FileSourceBase::connect(gr::top_block_sptr top_block)
// DUMP // DUMP
if (sink()) 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"; DLOG(INFO) << "connected output to file sink";
} }
// EXTRA DATA // SENSOR DATA
if (sensor_data_source()) 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"; DLOG(INFO) << "connected output to sensor data source, which now becomes the new output";
output = sensor_data_source(); output = sensor_data_source();
} }
@@ -259,15 +259,14 @@ void FileSourceBase::disconnect(gr::top_block_sptr top_block)
// DUMP // DUMP
if (sink()) 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"; DLOG(INFO) << "disconnected output to file sink";
} }
// EXTRA DATA // SENSOR DATA
if (sensor_data_source()) 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(output, 0, sensor_data_source(), 0);
top_block->disconnect(std::move(output), 0, sensor_data_source(), 0);
DLOG(INFO) << "disconnected output to extra data source"; DLOG(INFO) << "disconnected output to extra data source";
output = sensor_data_source(); output = sensor_data_source();
} }