1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 17:02:06 +03:00

Regex: Assert that the regex direction matches the vm direction

This commit is contained in:
Maxime Coste 2017-10-09 18:43:11 +08:00
parent 74ed102cab
commit c8966ca701

View File

@ -109,9 +109,7 @@ public:
ThreadedRegexVM(const CompiledRegex& program)
: m_program{program}
{
kak_assert(m_program);
if (direction != program.direction)
throw runtime_error{"Regex and VM direction mismatch"};
kak_assert(m_program and direction == m_program.direction);
}
ThreadedRegexVM(const ThreadedRegexVM&) = delete;