diff --git a/src/regex_impl.hh b/src/regex_impl.hh index a6b3a15e..bf21edce 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -235,10 +235,8 @@ public: constexpr bool search = (mode & RegexMode::Search); ConstArrayView instructions{m_program.instructions}; - if (forward) - instructions = instructions.subrange(0, m_program.first_backward_inst); - else - instructions = instructions.subrange(m_program.first_backward_inst); + instructions = forward ? instructions.subrange(0, m_program.first_backward_inst) + : instructions.subrange(m_program.first_backward_inst); const ExecConfig config{ Sentinel{forward ? begin : end},