diff --git a/src/buffer.inl.hh b/src/buffer.inl.hh index fbd04d4a..5db83659 100644 --- a/src/buffer.inl.hh +++ b/src/buffer.inl.hh @@ -180,12 +180,14 @@ inline BufferIterator BufferIterator::operator-(ByteCount size) const inline BufferIterator& BufferIterator::operator+=(ByteCount size) { - return *this = (*this + size); + m_coord = m_buffer->advance(m_coord, size); + return *this; } inline BufferIterator& BufferIterator::operator-=(ByteCount size) { - return *this = (*this - size); + m_coord = m_buffer->advance(m_coord, -size); + return *this; } [[gnu::always_inline]]