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/Help | |
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/Help')
-rw-r--r-- | Userland/Applications/Help/History.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/Help/ManualModel.cpp | 4 | ||||
-rw-r--r-- | Userland/Applications/Help/main.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Applications/Help/History.cpp b/Userland/Applications/Help/History.cpp index bb4c822dcb..beb26beac3 100644 --- a/Userland/Applications/Help/History.cpp +++ b/Userland/Applications/Help/History.cpp @@ -42,13 +42,13 @@ String History::current() void History::go_back() { - ASSERT(can_go_back()); + VERIFY(can_go_back()); m_current_history_item--; } void History::go_forward() { - ASSERT(can_go_forward()); + VERIFY(can_go_forward()); m_current_history_item++; } diff --git a/Userland/Applications/Help/ManualModel.cpp b/Userland/Applications/Help/ManualModel.cpp index 18e22979b1..8d5ca7eb7c 100644 --- a/Userland/Applications/Help/ManualModel.cpp +++ b/Userland/Applications/Help/ManualModel.cpp @@ -134,14 +134,14 @@ GUI::ModelIndex ManualModel::parent_index(const GUI::ModelIndex& index) const for (size_t row = 0; row < sizeof(s_sections) / sizeof(s_sections[0]); row++) if (&s_sections[row] == parent) return create_index(row, 0, parent); - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); } for (size_t row = 0; row < parent->parent()->children().size(); row++) { ManualNode* child_at_row = &parent->parent()->children()[row]; if (child_at_row == parent) return create_index(row, 0, parent); } - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); } int ManualModel::row_count(const GUI::ModelIndex& index) const diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp index f6bf6adc75..02089b1d59 100644 --- a/Userland/Applications/Help/main.cpp +++ b/Userland/Applications/Help/main.cpp @@ -167,7 +167,7 @@ int main(int argc, char* argv[]) String html; { auto md_document = Markdown::Document::parse(source); - ASSERT(md_document); + VERIFY(md_document); html = md_document->render_to_html(); } |