| 16 | } |
| 17 | |
| 18 | static inline Byte* allocateBuffer(size_t size) { |
| 19 | if (size == 0) { |
| 20 | return nullptr; |
| 21 | } |
| 22 | |
| 23 | return reinterpret_cast<Byte*>(malloc(sizeof(Byte) * size)); // NOLINT(cppcoreguidelines-no-malloc) |
| 24 | } |
| 25 | |
| 26 | ByteBuffer::ByteBuffer() = default; |
| 27 |