From 0c1d4808fa9301012c561614b0f4977a011c3209 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 12 Aug 2022 17:21:42 +0100 Subject: [PATCH] Slight code style tweak --- src/regex_impl.hh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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},