add postfix operator++ to BufferIterator
This commit is contained in:
parent
9ec10daf69
commit
669d2e456f
|
@ -59,6 +59,9 @@ public:
|
||||||
BufferIterator& operator++ ();
|
BufferIterator& operator++ ();
|
||||||
BufferIterator& operator-- ();
|
BufferIterator& operator-- ();
|
||||||
|
|
||||||
|
BufferIterator operator++ (int);
|
||||||
|
BufferIterator operator-- (int);
|
||||||
|
|
||||||
void clamp(bool avoid_eol);
|
void clamp(bool avoid_eol);
|
||||||
|
|
||||||
bool is_begin() const;
|
bool is_begin() const;
|
||||||
|
|
|
@ -199,6 +199,20 @@ inline BufferIterator& BufferIterator::operator--()
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline BufferIterator BufferIterator::operator++(int)
|
||||||
|
{
|
||||||
|
BufferIterator save = *this;
|
||||||
|
++*this;
|
||||||
|
return save;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline BufferIterator BufferIterator::operator--(int)
|
||||||
|
{
|
||||||
|
BufferIterator save = *this;
|
||||||
|
--*this;
|
||||||
|
return save;
|
||||||
|
}
|
||||||
|
|
||||||
inline bool BufferIterator::is_begin() const
|
inline bool BufferIterator::is_begin() const
|
||||||
{
|
{
|
||||||
assert(m_buffer);
|
assert(m_buffer);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user