mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:37:35 +00:00
AK: Make SeekableStream::truncate()
take a size_t
Similar to the return values earlier, a signed value doesn't really make sense here. Relying on the much more standard `size_t` makes it easier to use Stream in all contexts.
This commit is contained in:
parent
a85c18d3c4
commit
371c51f934
6 changed files with 9 additions and 6 deletions
|
@ -120,7 +120,7 @@ public:
|
|||
virtual ErrorOr<size_t> size();
|
||||
/// Shrinks or extends the stream to the given size. Returns an errno in
|
||||
/// the case of an error.
|
||||
virtual ErrorOr<void> truncate(off_t length) = 0;
|
||||
virtual ErrorOr<void> truncate(size_t length) = 0;
|
||||
/// Seeks until after the given amount of bytes to be discarded instead of
|
||||
/// reading and discarding everything manually;
|
||||
virtual ErrorOr<void> discard(size_t discarded_bytes) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue