mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
AK: Expose AllocatingMemoryStream::CHUNK_SIZE
This allows the tests to use that information confidently.
This commit is contained in:
parent
2b8a527478
commit
9a7ae52b31
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