mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:27:45 +00:00
LibRegex: Use a plain pointer for OpCode::m_state
This commit is contained in:
parent
d3c2a3caea
commit
a167941852
1 changed files with 4 additions and 4 deletions
|
@ -501,12 +501,12 @@ public:
|
||||||
|
|
||||||
ALWAYS_INLINE void set_bytecode(ByteCode& bytecode) { m_bytecode = &bytecode; }
|
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
|
ALWAYS_INLINE const MatchState& state() const
|
||||||
{
|
{
|
||||||
VERIFY(m_state.has_value());
|
VERIFY(m_state);
|
||||||
return *m_state.value();
|
return *m_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
const String to_string() const
|
const String to_string() const
|
||||||
|
@ -520,7 +520,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ByteCode* m_bytecode { nullptr };
|
ByteCode* m_bytecode { nullptr };
|
||||||
Optional<MatchState*> m_state;
|
MatchState* m_state { nullptr };
|
||||||
};
|
};
|
||||||
|
|
||||||
class OpCode_Exit final : public OpCode {
|
class OpCode_Exit final : public OpCode {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue