summaryrefslogtreecommitdiff
path: root/AK/CircularBuffer.h
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-04-04 18:29:43 +0200
committerTim Flynn <trflynn89@pm.me>2023-04-05 07:30:38 -0400
commit767fb01a8cf54f0760e5bbf408eb89d67239575d (patch)
treec1ebcd4b475517fc2df21c83e349a35082e045c9 /AK/CircularBuffer.h
parent997e745e87608467a8c5bd1f60da871743b1bbb6 (diff)
downloadserenity-767fb01a8cf54f0760e5bbf408eb89d67239575d.zip
AK: Report copied bytes when seekback copying from CircularBuffer
Otherwise, we have no way of determining whether our copy was truncated by accident.
Diffstat (limited to 'AK/CircularBuffer.h')
-rw-r--r--AK/CircularBuffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/AK/CircularBuffer.h b/AK/CircularBuffer.h
index be23b791e4..89861d0215 100644
--- a/AK/CircularBuffer.h
+++ b/AK/CircularBuffer.h
@@ -33,7 +33,7 @@ public:
/// before the current write pointer and allows for reading already-read data.
ErrorOr<Bytes> read_with_seekback(Bytes bytes, size_t distance);
- ErrorOr<void> copy_from_seekback(size_t distance, size_t length);
+ ErrorOr<size_t> copy_from_seekback(size_t distance, size_t length);
[[nodiscard]] size_t empty_space() const;
[[nodiscard]] size_t used_space() const;