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/Applications/HexEditor | |
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/Applications/HexEditor')
-rw-r--r-- | Userland/Applications/HexEditor/FindDialog.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/HexEditor/HexEditor.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/HexEditor/FindDialog.cpp b/Userland/Applications/HexEditor/FindDialog.cpp index 5c52f5738b..b24cc02660 100644 --- a/Userland/Applications/HexEditor/FindDialog.cpp +++ b/Userland/Applications/HexEditor/FindDialog.cpp @@ -101,7 +101,7 @@ Result<ByteBuffer, String> FindDialog::process_input(String text_value, OptionId } default: - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); } } diff --git a/Userland/Applications/HexEditor/HexEditor.cpp b/Userland/Applications/HexEditor/HexEditor.cpp index a4652866c1..392ddb2d4b 100644 --- a/Userland/Applications/HexEditor/HexEditor.cpp +++ b/Userland/Applications/HexEditor/HexEditor.cpp @@ -418,8 +418,8 @@ void HexEditor::hex_mode_keydown_event(GUI::KeyEvent& event) if ((event.key() >= KeyCode::Key_0 && event.key() <= KeyCode::Key_9) || (event.key() >= KeyCode::Key_A && event.key() <= KeyCode::Key_F)) { if (m_buffer.is_empty()) return; - ASSERT(m_position >= 0); - ASSERT(m_position < static_cast<int>(m_buffer.size())); + VERIFY(m_position >= 0); + VERIFY(m_position < static_cast<int>(m_buffer.size())); // yes, this is terrible... but it works. auto value = (event.key() >= KeyCode::Key_0 && event.key() <= KeyCode::Key_9) @@ -447,8 +447,8 @@ void HexEditor::text_mode_keydown_event(GUI::KeyEvent& event) { if (m_buffer.is_empty()) return; - ASSERT(m_position >= 0); - ASSERT(m_position < static_cast<int>(m_buffer.size())); + VERIFY(m_position >= 0); + VERIFY(m_position < static_cast<int>(m_buffer.size())); if (event.code_point() == 0) // This is a control key return; |