From 4cd7583bbcd85671eea51c9d7b0d1c2fbcc65b6d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 31 Oct 2018 21:13:14 +1100 Subject: Improve regex vm to next start performance by avoiding iterator copies --- src/utf8_iterator.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/utf8_iterator.hh') 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(m_it, m_end); + } + const BaseIt& base() const noexcept(noexcept_policy) { return m_it; } private: -- cgit v1.2.3