Update BoundedReadBuffer.cpp

This commit is contained in:
Kseniia Sumarokova 2023-01-20 16:25:02 +01:00 committed by GitHub
parent c066b9bddd
commit 01320da02b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ bool BoundedReadBuffer::nextImpl()
SwapHelper swap(*this, *impl);
result = impl->next();
}
chassert(file_offset_of_buffer_end + available() == impl->getFileOffsetOfBufferEnd());
if (result && read_until_position)
{
size_t remaining_size_to_read = *read_until_position - file_offset_of_buffer_end;
@ -58,7 +58,6 @@ bool BoundedReadBuffer::nextImpl()
}
}
file_offset_of_buffer_end += available();
chassert(file_offset_of_buffer_end == impl->getFileOffsetOfBufferEnd());
return result;
}