diff options
| author | Maxime Coste <mawww@kakoune.org> | 2022-08-12 17:21:42 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2022-08-20 11:03:03 +0200 |
| commit | 0c1d4808fa9301012c561614b0f4977a011c3209 (patch) | |
| tree | ccd99f5905443f8f5960a2897f82fa7582b13430 /src/regex_impl.hh | |
| parent | 21047db4a0775e61375065d429c583783815119e (diff) | |
Slight code style tweak
Diffstat (limited to 'src/regex_impl.hh')
| -rw-r--r-- | src/regex_impl.hh | 6 |
1 files 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<CompiledRegex::Instruction> 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}, |
