diff options
Diffstat (limited to 'AK/ByteBuffer.h')
-rw-r--r-- | AK/ByteBuffer.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/AK/ByteBuffer.h b/AK/ByteBuffer.h index 62075563e6..9f776c45a8 100644 --- a/AK/ByteBuffer.h +++ b/AK/ByteBuffer.h @@ -73,6 +73,14 @@ public: return copy(offset_pointer(offset), size); } + void grow(size_t size) + { + if (!m_impl) + m_impl = Buffer<byte>::create_uninitialized(size); + else + m_impl->grow(size); + } + private: explicit ByteBuffer(RetainPtr<Buffer<byte>>&& impl) : m_impl(move(impl)) |