Regex: comment the mutables in CompiledRegex::Instruction and fix their init

This commit is contained in:
Maxime Coste 2017-10-15 09:34:49 +08:00
parent 8b2297f5ca
commit 87eec79d07
2 changed files with 2 additions and 1 deletions

View File

@ -757,7 +757,7 @@ private:
uint32_t push_inst(CompiledRegex::Op op, uint32_t param = 0) uint32_t push_inst(CompiledRegex::Op op, uint32_t param = 0)
{ {
uint32_t res = m_program.instructions.size(); 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; return res;
} }

View File

@ -55,6 +55,7 @@ struct CompiledRegex : RefCountable, UseMemoryDomain<MemoryDomain::Regex>
struct Instruction struct Instruction
{ {
Op op; Op op;
// Those mutables are used during execution
mutable bool scheduled; mutable bool scheduled;
mutable uint16_t last_step; mutable uint16_t last_step;
uint32_t param; uint32_t param;