summaryrefslogtreecommitdiff
path: root/src/buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-11-04 00:58:56 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-11-04 01:01:52 +0000
commit719997f0abb4460e656ddc0235cc4ddbd7bc854e (patch)
tree165874d9abeebeec02f8b859711928b92b803b42 /src/buffer.hh
parent6273aa944378dc2a88fe044129a13427f74646bc (diff)
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
Diffstat (limited to 'src/buffer.hh')
-rw-r--r--src/buffer.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index 581321bc..90c1bb11 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -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);