diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2011-09-28 20:53:29 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2011-09-28 20:53:29 +0000 |
| commit | 7746c78cccef6cb35e193c85182a496b33bb0c7a (patch) | |
| tree | a8eee934698c3d71870919eac477ad2c26c9b902 /src/buffer.cc | |
| parent | a30b7c1e9f52ce3c5c22bc09d89ec093fc989b28 (diff) | |
BufferIterator: add operator>{,=}
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index d37a154e..d59977fe 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -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); |
