MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / remove

Method remove

proto/fbe.cpp:370–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370void FBEBuffer::remove(size_t offset, size_t size)
371{
372 assert(((offset + size) <= _size) && "Invalid offset & size!");
373 if ((offset + size) > _size)
374 throw std::invalid_argument("Invalid offset & size!");
375
376 std::memcpy(_data + offset, _data + offset + size, _size - size - offset);
377 _size -= size;
378 if (_offset >= (offset + size))
379 _offset -= size;
380 else if (_offset >= offset)
381 {
382 _offset -= _offset - offset;
383 if (_offset > _size)
384 _offset = _size;
385 }
386}
387
388void FBEBuffer::reserve(size_t capacity)
389{

Callers 1

send_serializedMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected