1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-23 15:23:29 +03:00

BufferIterator: add operator>{,=}

This commit is contained in:
Maxime Coste 2011-09-28 20:53:29 +00:00
parent a30b7c1e9f
commit 7746c78ccc
2 changed files with 14 additions and 0 deletions

View File

@ -61,6 +61,18 @@ bool BufferIterator::operator<=(const BufferIterator& iterator) const
return (m_position <= iterator.m_position);
}
bool BufferIterator::operator>(const BufferIterator& iterator) const
{
assert(m_buffer == iterator.m_buffer);
return (m_position > iterator.m_position);
}
bool BufferIterator::operator>=(const BufferIterator& iterator) const
{
assert(m_buffer == iterator.m_buffer);
return (m_position >= iterator.m_position);
}
BufferChar BufferIterator::operator*() const
{
assert(m_buffer);

View File

@ -42,6 +42,8 @@ public:
bool operator!= (const BufferIterator& iterator) const;
bool operator< (const BufferIterator& iterator) const;
bool operator<= (const BufferIterator& iterator) const;
bool operator> (const BufferIterator& iterator) const;
bool operator>= (const BufferIterator& iterator) const;
BufferChar operator* () const;
BufferSize operator- (const BufferIterator& iterator) const;