1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

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.
This commit is contained in:
Andreas Kling 2021-02-23 20:42:32 +01:00
parent b33a6a443e
commit 5d180d1f99
725 changed files with 3448 additions and 3448 deletions

View file

@ -110,13 +110,13 @@ HunkLocation parse_hunk_location(const String& location_line)
};
while (char_index < location_line.length() && location_line[char_index++] != '-') {
}
ASSERT(char_index < location_line.length());
VERIFY(char_index < location_line.length());
size_t original_location_start_index = char_index;
while (char_index < location_line.length() && location_line[char_index++] != ' ') {
}
ASSERT(char_index < location_line.length() && location_line[char_index] == '+');
VERIFY(char_index < location_line.length() && location_line[char_index] == '+');
size_t original_location_end_index = char_index - 2;
size_t target_location_start_index = char_index + 1;
@ -124,7 +124,7 @@ HunkLocation parse_hunk_location(const String& location_line)
char_index += 1;
while (char_index < location_line.length() && location_line[char_index++] != ' ') {
}
ASSERT(char_index < location_line.length());
VERIFY(char_index < location_line.length());
size_t target_location_end_index = char_index - 2;