1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:57:45 +00:00

AK: Add ByteBuffer::append(ReadonlyBytes)

This commit is contained in:
Matthew Olsson 2021-05-26 22:38:56 -07:00 committed by Ali Mohammad Pur
parent 78bc9d1539
commit ffda24373a

View file

@ -161,6 +161,11 @@ public:
ensure_capacity_slowpath(new_capacity); ensure_capacity_slowpath(new_capacity);
} }
void append(ReadonlyBytes const& bytes)
{
append(bytes.data(), bytes.size());
}
void append(void const* data, size_t data_size) void append(void const* data, size_t data_size)
{ {
if (data_size == 0) if (data_size == 0)