From 49e06dc9e31ebd5eaf7859e290825ab1b1ee32a0 Mon Sep 17 00:00:00 2001 From: Victor Castillo Date: Tue, 10 Jun 2025 12:29:11 +0200 Subject: [PATCH] fix: inappropriate move semantics in file_source_base --- .../signal_source/adapters/file_source_base.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/algorithms/signal_source/adapters/file_source_base.cc b/src/algorithms/signal_source/adapters/file_source_base.cc index 72f14225e..72827588e 100644 --- a/src/algorithms/signal_source/adapters/file_source_base.cc +++ b/src/algorithms/signal_source/adapters/file_source_base.cc @@ -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(); }