mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
AK: Allow specifying writability of a FixedMemoryStream
This commit is contained in:
parent
644d9c784d
commit
bbeabe929b
Notes:
sideshowbarker
2024-07-17 03:19:14 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: bbeabe929b
Pull-request: https://github.com/SerenityOS/serenity/pull/21156
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/timschumi ✅
2 changed files with 3 additions and 2 deletions
|
@ -12,8 +12,9 @@
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
FixedMemoryStream::FixedMemoryStream(Bytes bytes)
|
FixedMemoryStream::FixedMemoryStream(Bytes bytes, bool writing_enabled)
|
||||||
: m_bytes(bytes)
|
: m_bytes(bytes)
|
||||||
|
, m_writing_enabled(writing_enabled)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace AK {
|
||||||
/// using a single read/write head.
|
/// using a single read/write head.
|
||||||
class FixedMemoryStream : public SeekableStream {
|
class FixedMemoryStream : public SeekableStream {
|
||||||
public:
|
public:
|
||||||
explicit FixedMemoryStream(Bytes bytes);
|
explicit FixedMemoryStream(Bytes bytes, bool writing_enabled = true);
|
||||||
explicit FixedMemoryStream(ReadonlyBytes bytes);
|
explicit FixedMemoryStream(ReadonlyBytes bytes);
|
||||||
|
|
||||||
virtual bool is_eof() const override;
|
virtual bool is_eof() const override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue