1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:04:59 +00:00

AK+Libraries: Remove FixedMemoryStream::[readonly_]bytes()

These methods are slightly more convenient than storing the Bytes
separately. However, it it feels unsanitary to reach in and access this
data directly. Both of the users of these already have the
[Readonly]Bytes available in their constructors, and can easily avoid
using these methods, so let's remove them entirely.
This commit is contained in:
Sam Atkins 2023-07-27 15:05:13 +01:00 committed by Sam Atkins
parent 109ea418ab
commit 3f7d97f098
4 changed files with 12 additions and 19 deletions

View file

@ -109,16 +109,6 @@ ErrorOr<void> FixedMemoryStream::write_until_depleted(ReadonlyBytes bytes)
return {};
}
Bytes FixedMemoryStream::bytes()
{
VERIFY(m_writing_enabled);
return m_bytes;
}
ReadonlyBytes FixedMemoryStream::readonly_bytes() const
{
return m_bytes;
}
size_t FixedMemoryStream::offset() const
{
return m_offset;