mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
AK: Add a ByteBuffer::copy(ReadonlyBytes) overload
This commit is contained in:
parent
e7e5a5e677
commit
bf7cda414f
1 changed files with 1 additions and 0 deletions
|
@ -123,6 +123,7 @@ public:
|
|||
static ByteBuffer create_uninitialized(size_t size) { return ByteBuffer(ByteBufferImpl::create_uninitialized(size)); }
|
||||
static ByteBuffer create_zeroed(size_t size) { return ByteBuffer(ByteBufferImpl::create_zeroed(size)); }
|
||||
static ByteBuffer copy(const void* data, size_t size) { return ByteBuffer(ByteBufferImpl::copy(data, size)); }
|
||||
static ByteBuffer copy(ReadonlyBytes bytes) { return ByteBuffer(ByteBufferImpl::copy(bytes.data(), bytes.size())); }
|
||||
|
||||
~ByteBuffer() { clear(); }
|
||||
void clear() { m_impl = nullptr; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue