diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-05-30 14:05:05 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-05-30 14:05:05 +0200 |
| commit | 07c837931333b9ea9e227fb5eaf5f60111cb2545 (patch) | |
| tree | 8bc4004cc2fa3694d7f8fe5d7bd5f06b9cea8637 /src/buffer.hh | |
| parent | d2df6a9f1508d8faa8760f7df3b3f404cdefd656 (diff) | |
BufferIterator are Random Access iterators
Diffstat (limited to 'src/buffer.hh')
| -rw-r--r-- | src/buffer.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.hh b/src/buffer.hh index 03b96b34..8f3121e5 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -31,7 +31,7 @@ public: typedef size_t difference_type; typedef const value_type* pointer; typedef const value_type& reference; - typedef std::bidirectional_iterator_tag iterator_category; + typedef std::random_access_iterator_tag iterator_category; BufferIterator() : m_buffer(nullptr) {} BufferIterator(const Buffer& buffer, BufferCoord coord); @@ -44,6 +44,7 @@ public: bool operator>= (const BufferIterator& iterator) const; char operator* () const; + char operator[](size_t n) const; size_t operator- (const BufferIterator& iterator) const; BufferIterator operator+ (ByteCount size) const; |
