From 87eec79d07454352a8e063cb825c2817eb0a0db4 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 15 Oct 2017 09:34:49 +0800 Subject: [PATCH] Regex: comment the mutables in CompiledRegex::Instruction and fix their init --- src/regex_impl.cc | 2 +- src/regex_impl.hh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/regex_impl.cc b/src/regex_impl.cc index 57300a51..f99fe5e0 100644 --- a/src/regex_impl.cc +++ b/src/regex_impl.cc @@ -757,7 +757,7 @@ private: uint32_t push_inst(CompiledRegex::Op op, uint32_t param = 0) { uint32_t res = m_program.instructions.size(); - m_program.instructions.push_back({ op, false, false, param }); + m_program.instructions.push_back({ op, false, 0, param }); return res; } diff --git a/src/regex_impl.hh b/src/regex_impl.hh index 27820605..664fb4f4 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -55,6 +55,7 @@ struct CompiledRegex : RefCountable, UseMemoryDomain struct Instruction { Op op; + // Those mutables are used during execution mutable bool scheduled; mutable uint16_t last_step; uint32_t param;