-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
The throw occurs too frequently in the following code.
void FBEBuffer::remove(size_t offset, size_t size)
{
assert(((offset + size) <= _size) && "Invalid offset & size!!");
if ((offset + size) > _size)
throw std::invalid_argument("Invalid offset & size!!");
std::memcpy(_data + offset, _data + offset + size, _size - size - offset);
_size -= size;
if (_offset >= (offset + size))
_offset -= size;
else if (_offset >= offset)
{
_offset -= _offset - offset;
if (_offset > _size)
_offset = _size;
}
}
After that, the transmission doesn't proceed.
What is the solution?
Metadata
Metadata
Assignees
Labels
No labels