summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-07-19 18:34:40 +1000
committerMaxime Coste <mawww@kakoune.org>2018-07-19 18:34:40 +1000
commit7ed5d53fe63e0d761918afbb63d8783e4da38233 (patch)
tree0ae9920615e5802bc8e5e54ebaac937e6a45be91 /src
parent2a3e3f0514f84ce93f3f26e85bf38d88917389d7 (diff)
Fix RegexCompileFlags::Backwards having the same value as Optimize
That means every Optimized regex had the Backwards version compiled as well, which doubled the time it took to compile them and doubled the memory usage of regex. This should improve #2152
Diffstat (limited to 'src')
-rw-r--r--src/regex_impl.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/regex_impl.hh b/src/regex_impl.hh
index 155eb7ac..9ab0e55d 100644
--- a/src/regex_impl.hh
+++ b/src/regex_impl.hh
@@ -120,8 +120,8 @@ enum class RegexCompileFlags
None = 0,
NoSubs = 1 << 0,
Optimize = 1 << 1,
- Backward = 1 << 1,
- NoForward = 1 << 2,
+ Backward = 1 << 2,
+ NoForward = 1 << 3,
};
constexpr bool with_bit_ops(Meta::Type<RegexCompileFlags>) { return true; }