1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-04-20 09:43:14 +00:00

Removing a TODO

Answer:
No, the default constructor for `shared_ptr<T>` does not instantiate the contained type, it starts with a nullptr. This is the reason for `std::make_shared<T>()`.
You can also use the constructor if you want to manage an already existing pointer by passing it as an argument (ie: `std::shared_ptr<T>{new T{}}`).
This commit is contained in:
Victor Castillo 2024-07-29 12:23:51 +02:00
parent 4d4558b054
commit 4875725e29
No known key found for this signature in database
GPG Key ID: 8EF1FC8B7182F608

View File

@ -285,7 +285,6 @@ void FileSourceBase::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr FileSourceBase::get_left_block()
{
// TODO: is this right? Shouldn't the left block be a nullptr?
LOG(WARNING) << "Left block of a signal source should not be retrieved";
return gr::blocks::file_source::sptr();
}