diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-23 20:42:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-23 20:56:54 +0100 |
commit | 5d180d1f996ead27f9c5cb3db7f91e293de34d9d (patch) | |
tree | e881854dac5d749518562970d6194a0ef65736ec /Userland/Libraries/LibRegex/RegexByteCode.h | |
parent | b33a6a443e700cd80325d312f21c985b0687bb97 (diff) | |
download | serenity-5d180d1f996ead27f9c5cb3db7f91e293de34d9d.zip |
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
Diffstat (limited to 'Userland/Libraries/LibRegex/RegexByteCode.h')
-rw-r--r-- | Userland/Libraries/LibRegex/RegexByteCode.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Userland/Libraries/LibRegex/RegexByteCode.h b/Userland/Libraries/LibRegex/RegexByteCode.h index f9a69c6d73..1909e36a91 100644 --- a/Userland/Libraries/LibRegex/RegexByteCode.h +++ b/Userland/Libraries/LibRegex/RegexByteCode.h @@ -161,10 +161,10 @@ public: ByteCode arguments; for (auto& value : pairs) { - ASSERT(value.type != CharacterCompareType::RangeExpressionDummy); - ASSERT(value.type != CharacterCompareType::Undefined); - ASSERT(value.type != CharacterCompareType::String); - ASSERT(value.type != CharacterCompareType::NamedReference); + VERIFY(value.type != CharacterCompareType::RangeExpressionDummy); + VERIFY(value.type != CharacterCompareType::Undefined); + VERIFY(value.type != CharacterCompareType::String); + VERIFY(value.type != CharacterCompareType::NamedReference); arguments.append((ByteCodeValueType)value.type); if (value.type != CharacterCompareType::Inverse && value.type != CharacterCompareType::AnyChar && value.type != CharacterCompareType::TemporaryInverse) @@ -327,7 +327,7 @@ public: } } - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); } void insert_bytecode_alternation(ByteCode&& left, ByteCode&& right) @@ -503,7 +503,7 @@ public: ALWAYS_INLINE ByteCodeValueType argument(size_t offset) const { - ASSERT(state().instruction_position + offset <= m_bytecode->size()); + VERIFY(state().instruction_position + offset <= m_bytecode->size()); return m_bytecode->at(state().instruction_position + 1 + offset); } @@ -526,7 +526,7 @@ public: ALWAYS_INLINE const MatchState& state() const { - ASSERT(m_state.has_value()); + VERIFY(m_state.has_value()); return *m_state.value(); } @@ -809,28 +809,28 @@ ALWAYS_INLINE bool is<OpCode_Compare>(const OpCode& opcode) template<typename T> ALWAYS_INLINE const T& to(const OpCode& opcode) { - ASSERT(is<T>(opcode)); + VERIFY(is<T>(opcode)); return static_cast<const T&>(opcode); } template<typename T> ALWAYS_INLINE T* to(OpCode* opcode) { - ASSERT(is<T>(opcode)); + VERIFY(is<T>(opcode)); return static_cast<T*>(opcode); } template<typename T> ALWAYS_INLINE const T* to(const OpCode* opcode) { - ASSERT(is<T>(opcode)); + VERIFY(is<T>(opcode)); return static_cast<const T*>(opcode); } template<typename T> ALWAYS_INLINE T& to(OpCode& opcode) { - ASSERT(is<T>(opcode)); + VERIFY(is<T>(opcode)); return static_cast<T&>(opcode); } |