mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-30 23:03:05 +00:00 
			
		
		
		
	Fix performance inefficiencies detected by Coverity Scan
This commit is contained in:
		| @@ -186,11 +186,11 @@ void FileSourceBase::connect(gr::top_block_sptr top_block) | ||||
|     // DUMP | ||||
|     if (sink()) | ||||
|         { | ||||
|             top_block->connect(output, 0, sink(), 0); | ||||
|             top_block->connect(std::move(output), 0, sink(), 0); | ||||
|             DLOG(INFO) << "connected output to file sink"; | ||||
|         } | ||||
|  | ||||
|     post_connect_hook(top_block); | ||||
|     post_connect_hook(std::move(top_block)); | ||||
| } | ||||
|  | ||||
|  | ||||
| @@ -219,7 +219,7 @@ void FileSourceBase::disconnect(gr::top_block_sptr top_block) | ||||
|     // VALVE | ||||
|     if (valve()) | ||||
|         { | ||||
|             top_block->disconnect(input, 0, valve(), 0); | ||||
|             top_block->disconnect(std::move(input), 0, valve(), 0); | ||||
|             DLOG(INFO) << "disconnected source to valve"; | ||||
|  | ||||
|             output = valve(); | ||||
| @@ -234,11 +234,11 @@ void FileSourceBase::disconnect(gr::top_block_sptr top_block) | ||||
|     // DUMP | ||||
|     if (sink()) | ||||
|         { | ||||
|             top_block->disconnect(output, 0, sink(), 0); | ||||
|             top_block->disconnect(std::move(output), 0, sink(), 0); | ||||
|             DLOG(INFO) << "disconnected output to file sink"; | ||||
|         } | ||||
|  | ||||
|     post_disconnect_hook(top_block); | ||||
|     post_disconnect_hook(std::move(top_block)); | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -70,7 +70,7 @@ void GenSignalSource::disconnect(gr::top_block_sptr top_block) | ||||
|         filter_->get_left_block(), 0); | ||||
|  | ||||
|     signal_generator_->disconnect(top_block); | ||||
|     filter_->disconnect(top_block); | ||||
|     filter_->disconnect(std::move(top_block)); | ||||
|  | ||||
|     connected_ = false; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez