summaryrefslogtreecommitdiff
path: root/src/regex_impl.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-05-31 12:38:47 +1000
committerMaxime Coste <mawww@kakoune.org>2024-05-31 12:38:47 +1000
commit727d2391c7695056ce6bb170b127c6e6ca9e1ab4 (patch)
tree0c6a0018e715161f34d33b252fd3e754829efac4 /src/regex_impl.hh
parent5c97efacb9050159aed83902184dc9c9272c4a56 (diff)
Small regex code cleanup
Diffstat (limited to 'src/regex_impl.hh')
-rw-r--r--src/regex_impl.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/regex_impl.hh b/src/regex_impl.hh
index 465cfdf5..46267f7a 100644
--- a/src/regex_impl.hh
+++ b/src/regex_impl.hh
@@ -481,7 +481,7 @@ private:
const int16_t first_inst = forward ? 0 : m_program.first_backward_inst;
m_threads.push_current({first_inst, -1});
- const auto& start_desc = forward ? m_program.forward_start_desc : m_program.backward_start_desc;
+ const auto* start_desc = (forward ? m_program.forward_start_desc : m_program.backward_start_desc).get();
auto next_start = pos;
constexpr bool search = mode & RegexMode::Search;
@@ -647,8 +647,6 @@ private:
}
}
- const CompiledRegex& m_program;
-
struct DualThreadStack
{
bool current_is_empty() const { return m_current == m_next_begin; }
@@ -721,6 +719,7 @@ private:
static constexpr bool forward = mode & RegexMode::Forward;
+ const CompiledRegex& m_program;
DualThreadStack m_threads;
Vector<Saves, MemoryDomain::Regex> m_saves;
int16_t m_first_free = -1;