Allow equality comparison between buffer iterators from differnt buffers

This commit is contained in:
Maxime Coste 2016-04-21 20:26:25 +01:00
parent a22b1b6bc8
commit de033d2915

View File

@ -118,14 +118,12 @@ inline BufferIterator::BufferIterator(const Buffer& buffer, ByteCoord coord)
inline bool BufferIterator::operator==(const BufferIterator& iterator) const inline bool BufferIterator::operator==(const BufferIterator& iterator) const
{ {
kak_assert(m_buffer == iterator.m_buffer); return m_buffer == iterator.m_buffer and m_coord == iterator.m_coord;
return m_coord == iterator.m_coord;
} }
inline bool BufferIterator::operator!=(const BufferIterator& iterator) const inline bool BufferIterator::operator!=(const BufferIterator& iterator) const
{ {
kak_assert(m_buffer == iterator.m_buffer); return m_buffer != iterator.m_buffer or m_coord != iterator.m_coord;
return m_coord != iterator.m_coord;
} }
inline bool BufferIterator::operator<(const BufferIterator& iterator) const inline bool BufferIterator::operator<(const BufferIterator& iterator) const