mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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:
Notes:
sideshowbarker
2024-07-18 21:58:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5d180d1f996
@@ -65,9 +65,9 @@ void AESCipherKey::expand_encrypt_key(ReadonlyBytes user_key, size_t bits)
|
||||
u32 temp;
|
||||
size_t i { 0 };
|
||||
|
||||
ASSERT(!user_key.is_null());
|
||||
ASSERT(is_valid_key_size(bits));
|
||||
ASSERT(user_key.size() == bits / 8);
|
||||
VERIFY(!user_key.is_null());
|
||||
VERIFY(is_valid_key_size(bits));
|
||||
VERIFY(user_key.size() == bits / 8);
|
||||
|
||||
round_key = round_keys();
|
||||
|
||||
@@ -401,7 +401,7 @@ void AESCipherBlock::overwrite(ReadonlyBytes bytes)
|
||||
auto data = bytes.data();
|
||||
auto length = bytes.size();
|
||||
|
||||
ASSERT(length <= this->data_size());
|
||||
VERIFY(length <= this->data_size());
|
||||
this->bytes().overwrite(0, data, length);
|
||||
if (length < this->data_size()) {
|
||||
switch (padding_mode()) {
|
||||
@@ -419,7 +419,7 @@ void AESCipherBlock::overwrite(ReadonlyBytes bytes)
|
||||
break;
|
||||
default:
|
||||
// FIXME: We should handle the rest of the common padding modes
|
||||
ASSERT_NOT_REACHED();
|
||||
VERIFY_NOT_REACHED();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user