1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

AK: Make ByteBuffer's copy() and wrap() take void*.

This way we don't have to cast whatever we're passing to copy()/wrap().
This commit is contained in:
Andreas Kling 2019-03-17 00:36:41 +01:00
parent 5b0cbf547d
commit 1c6dfc3282
4 changed files with 11 additions and 11 deletions

View file

@ -87,9 +87,9 @@ public:
static ByteBuffer create_uninitialized(ssize_t size) { return ByteBuffer(ByteBufferImpl::create_uninitialized(size)); }
static ByteBuffer create_zeroed(ssize_t size) { return ByteBuffer(ByteBufferImpl::create_zeroed(size)); }
static ByteBuffer copy(const byte* data, ssize_t size) { return ByteBuffer(ByteBufferImpl::copy(data, size)); }
static ByteBuffer wrap(byte* data, ssize_t size) { return ByteBuffer(ByteBufferImpl::wrap(data, size)); }
static ByteBuffer adopt(byte* data, ssize_t size) { return ByteBuffer(ByteBufferImpl::adopt(data, size)); }
static ByteBuffer copy(const void* data, ssize_t size) { return ByteBuffer(ByteBufferImpl::copy(data, size)); }
static ByteBuffer wrap(void* data, ssize_t size) { return ByteBuffer(ByteBufferImpl::wrap(data, size)); }
static ByteBuffer adopt(void* data, ssize_t size) { return ByteBuffer(ByteBufferImpl::adopt(data, size)); }
~ByteBuffer() { clear(); }
void clear() { m_impl = nullptr; }