summaryrefslogtreecommitdiff
path: root/src/utf8_iterator.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-10-31 21:13:14 +1100
committerMaxime Coste <mawww@kakoune.org>2018-11-01 08:22:43 +1100
commit4cd7583bbcd85671eea51c9d7b0d1c2fbcc65b6d (patch)
tree18fa43e9ec8f16578452b8cfe44399948c4060b0 /src/utf8_iterator.hh
parent4cfb46ff2e6c63c28c1881b366e33d817c45b637 (diff)
Improve regex vm to next start performance by avoiding iterator copies
Diffstat (limited to 'src/utf8_iterator.hh')
-rw-r--r--src/utf8_iterator.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utf8_iterator.hh b/src/utf8_iterator.hh
index c145f900..9d10df2a 100644
--- a/src/utf8_iterator.hh
+++ b/src/utf8_iterator.hh
@@ -130,6 +130,11 @@ public:
return get_value();
}
+ CodepointType read() noexcept(noexcept_policy)
+ {
+ return (CodepointType)utf8::read_codepoint<InvalidPolicy>(m_it, m_end);
+ }
+
const BaseIt& base() const noexcept(noexcept_policy) { return m_it; }
private: