1
0
Fork 0
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:
Tim Schumacher 2023-05-29 11:00:25 +02:00 committed by Jelle Raaijmakers
parent 2b8a527478
commit 9a7ae52b31
Notes: sideshowbarker 2024-07-17 12:02:22 +09:00
3 changed files with 18 additions and 18 deletions

View file

@ -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();