1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

LibRegex: Use a plain pointer for OpCode::m_state

This commit is contained in:
Gunnar Beutner 2021-06-13 22:59:36 +02:00 committed by Ali Mohammad Pur
parent d3c2a3caea
commit a167941852

View file

@ -501,12 +501,12 @@ public:
ALWAYS_INLINE void set_bytecode(ByteCode& bytecode) { m_bytecode = &bytecode; }
ALWAYS_INLINE void reset_state() { m_state.clear(); }
ALWAYS_INLINE void reset_state() { m_state = nullptr; }
ALWAYS_INLINE const MatchState& state() const
{
VERIFY(m_state.has_value());
return *m_state.value();
VERIFY(m_state);
return *m_state;
}
const String to_string() const
@ -520,7 +520,7 @@ public:
protected:
ByteCode* m_bytecode { nullptr };
Optional<MatchState*> m_state;
MatchState* m_state { nullptr };
};
class OpCode_Exit final : public OpCode {