mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
AK: Expose AllocatingMemoryStream::CHUNK_SIZE
This allows the tests to use that information confidently.
This commit is contained in:
parent
2b8a527478
commit
9a7ae52b31
Notes:
sideshowbarker
2024-07-17 12:02:22 +09:00
Author: https://github.com/timschumi
Commit: 9a7ae52b31
Pull-request: https://github.com/SerenityOS/serenity/pull/19122
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/gmta ✅
3 changed files with 18 additions and 18 deletions
|
@ -45,6 +45,8 @@ private:
|
|||
/// and reading back the written data afterwards.
|
||||
class AllocatingMemoryStream final : public Stream {
|
||||
public:
|
||||
static constexpr size_t CHUNK_SIZE = 4096;
|
||||
|
||||
virtual ErrorOr<Bytes> read_some(Bytes) override;
|
||||
virtual ErrorOr<size_t> write_some(ReadonlyBytes) override;
|
||||
virtual ErrorOr<void> discard(size_t) override;
|
||||
|
@ -59,7 +61,6 @@ public:
|
|||
private:
|
||||
// Note: We set the inline buffer capacity to zero to make moving chunks as efficient as possible.
|
||||
using Chunk = AK::Detail::ByteBuffer<0>;
|
||||
static constexpr size_t chunk_size = 4096;
|
||||
|
||||
ErrorOr<ReadonlyBytes> next_read_range();
|
||||
ErrorOr<Bytes> next_write_range();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue