Make BufferIterator only a bidirectional iterator
Distance computation is too expensive on BufferIterators to treat them as random access.
This commit is contained in:
parent
072064407a
commit
68b92b9ac1
|
@ -55,7 +55,9 @@ public:
|
|||
using difference_type = ssize_t;
|
||||
using pointer = const value_type*;
|
||||
using reference = const value_type&;
|
||||
using iterator_category = std::random_access_iterator_tag;
|
||||
// computing the distance between two iterator can be
|
||||
// costly, so this is not strictly random access
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
|
||||
BufferIterator() : m_buffer(nullptr) {}
|
||||
BufferIterator(const Buffer& buffer, BufferCoord coord);
|
||||
|
|
Loading…
Reference in New Issue
Block a user