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/KeyboardSettings | |
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/KeyboardSettings')
-rw-r--r-- | Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h | 4 | ||||
-rw-r--r-- | Userland/Applications/KeyboardSettings/main.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h b/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h index 4fcd1d8123..5c5c6cb8b1 100644 --- a/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h +++ b/Userland/Applications/KeyboardSettings/CharacterMapFileListModel.h @@ -50,8 +50,8 @@ public: virtual GUI::Variant data(const GUI::ModelIndex& index, GUI::ModelRole role) const override { - ASSERT(index.is_valid()); - ASSERT(index.column() == 0); + VERIFY(index.is_valid()); + VERIFY(index.column() == 0); if (role == GUI::ModelRole::Display) return m_file_names.at(index.row()); diff --git a/Userland/Applications/KeyboardSettings/main.cpp b/Userland/Applications/KeyboardSettings/main.cpp index fd372cf433..cc099d598a 100644 --- a/Userland/Applications/KeyboardSettings/main.cpp +++ b/Userland/Applications/KeyboardSettings/main.cpp @@ -82,12 +82,12 @@ int main(int argc, char** argv) auto proc_keymap = Core::File::construct("/proc/keymap"); if (!proc_keymap->open(Core::IODevice::OpenMode::ReadOnly)) - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); auto json = JsonValue::from_string(proc_keymap->read_all()); - ASSERT(json.has_value()); + VERIFY(json.has_value()); JsonObject keymap_object = json.value().as_object(); - ASSERT(keymap_object.has("keymap")); + VERIFY(keymap_object.has("keymap")); String current_keymap = keymap_object.get("keymap").to_string(); dbgln("KeyboardSettings thinks the current keymap is: {}", current_keymap); @@ -110,7 +110,7 @@ int main(int argc, char** argv) if (character_map_files[i].equals_ignoring_case(current_keymap)) initial_keymap_index = i; } - ASSERT(initial_keymap_index < character_map_files.size()); + VERIFY(initial_keymap_index < character_map_files.size()); auto window = GUI::Window::construct(); window->set_title("Keyboard Settings"); |