BufferIterator: allow operator{==,!=} for different buffers

This commit is contained in:
Maxime Coste 2013-04-09 14:28:03 +02:00
parent 61293e8d60
commit 5b1839ab75

View File

@ -36,14 +36,12 @@ inline void BufferIterator::clamp(bool avoid_eol)
inline bool BufferIterator::operator==(const BufferIterator& iterator) const
{
assert(m_buffer == iterator.m_buffer);
return (m_coord == iterator.m_coord);
return (m_buffer == iterator.m_buffer and m_coord == iterator.m_coord);
}
inline bool BufferIterator::operator!=(const BufferIterator& iterator) const
{
assert(m_buffer == iterator.m_buffer);
return (m_coord != iterator.m_coord);
return (m_buffer != iterator.m_buffer or m_coord != iterator.m_coord);
}
inline bool BufferIterator::operator<(const BufferIterator& iterator) const