Slight code style tweak

This commit is contained in:
Maxime Coste 2022-08-12 17:21:42 +01:00
parent 21047db4a0
commit 0c1d4808fa

View File

@ -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},