mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-08-30 09:27:58 +00:00
Minor fixes
- std::ifstream::read() is the one we want to use, not std::ifstream::get() - `override` keyword does not go in the implementation - `get_right_block()` needs to return `extra_data_source_` in some cases
This commit is contained in:
@@ -295,6 +295,7 @@ gr::basic_block_sptr FileSourceBase::get_right_block()
|
||||
// clang-tidy wants braces around the if-conditions. clang-format wants to break the braces into
|
||||
// multiple line blocks. It's much more readable this way
|
||||
// clang-format off
|
||||
if (extra_data_source_) { return extra_data_source_; }
|
||||
if (valve_) { return valve_; }
|
||||
if (throttle_) { return throttle_; }
|
||||
return source();
|
||||
|
@@ -61,7 +61,7 @@ std::size_t ExtraDataSource::get_sample_period() const
|
||||
|
||||
int ExtraDataSource::work(int noutput_items,
|
||||
gr_vector_const_void_star& input_items,
|
||||
gr_vector_void_star& output_items) override
|
||||
gr_vector_void_star& output_items)
|
||||
{
|
||||
const std::size_t ch = 0;
|
||||
const int item_size = input_signature()->sizeof_stream_item(ch);
|
||||
|
@@ -65,7 +65,7 @@ std::vector<uint8_t> ExtraDataFile::read_item()
|
||||
|
||||
void ExtraDataFile::read_into_io_buffer()
|
||||
{
|
||||
file_.get(reinterpret_cast<char*>(io_buffer_.data()), io_buffer_size_);
|
||||
file_.read(reinterpret_cast<char*>(&io_buffer_[0]), io_buffer_size_);
|
||||
const std::size_t bytes_read = file_.gcount();
|
||||
|
||||
if (bytes_read < io_buffer_size_)
|
||||
@@ -73,7 +73,7 @@ void ExtraDataFile::read_into_io_buffer()
|
||||
if (repeat_)
|
||||
{
|
||||
reset();
|
||||
file_.get(reinterpret_cast<char*>(&io_buffer_[bytes_read]), io_buffer_size_ - bytes_read);
|
||||
file_.read(reinterpret_cast<char*>(&io_buffer_[bytes_read]), io_buffer_size_ - bytes_read);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user