diff --git a/AK/CircularBuffer.cpp b/AK/CircularBuffer.cpp index 647d4520471..362ba0310bd 100644 --- a/AK/CircularBuffer.cpp +++ b/AK/CircularBuffer.cpp @@ -186,7 +186,7 @@ Bytes CircularBuffer::read(Bytes bytes) return bytes.trim(bytes.size() - remaining); } -ErrorOr CircularBuffer::read_with_seekback(Bytes bytes, size_t distance) +ErrorOr 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"); diff --git a/AK/CircularBuffer.h b/AK/CircularBuffer.h index c9a77d78180..52a14b73906 100644 --- a/AK/CircularBuffer.h +++ b/AK/CircularBuffer.h @@ -31,7 +31,7 @@ public: /// Compared to `read()`, this starts reading from an offset that is `distance` bytes /// before the current write pointer and allows for reading already-read data. - ErrorOr read_with_seekback(Bytes bytes, size_t distance); + ErrorOr read_with_seekback(Bytes bytes, size_t distance) const; ErrorOr copy_from_seekback(size_t distance, size_t length);