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

Do not tag BufferIterator as random access

Boost regex considers that random access means fast distance
computation, which is not the case for BufferIterator where
Buffer::distance is O(num lines between them) which can get
big on large files.

Fixes #462
This commit is contained in:
Maxime Coste 2015-11-04 00:58:56 +00:00
parent 6273aa9443
commit 719997f0ab

View File

@ -24,7 +24,7 @@ public:
using difference_type = size_t;
using pointer = const value_type*;
using reference = const value_type&;
using iterator_category = std::random_access_iterator_tag;
using iterator_category = std::bidirectional_iterator_tag;
BufferIterator() : m_buffer(nullptr) {}
BufferIterator(const Buffer& buffer, ByteCoord coord);