1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:07:35 +00:00

AK: Make CircularBuffer::read_with_seekback const

Compared to the other read and write functions, this doesn't modify the
internal state of the circular buffer.
This commit is contained in:
Tim Schumacher 2023-06-02 12:57:03 +02:00 committed by Linus Groh
parent 42d01b21d8
commit 4a10cf1506
2 changed files with 2 additions and 2 deletions

View file

@ -186,7 +186,7 @@ Bytes CircularBuffer::read(Bytes bytes)
return bytes.trim(bytes.size() - remaining);
}
ErrorOr<Bytes> CircularBuffer::read_with_seekback(Bytes bytes, size_t distance)
ErrorOr<Bytes> CircularBuffer::read_with_seekback(Bytes bytes, size_t distance) const
{
if (distance > m_seekback_limit)
return Error::from_string_literal("Tried a seekback read beyond the seekback limit");