1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +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

@ -85,7 +85,7 @@ Card::Card(Type type, uint8_t value)
, m_type(type)
, m_value(value)
{
ASSERT(value < card_count);
VERIFY(value < card_count);
Gfx::IntRect paint_rect({ 0, 0 }, { width, height });
if (s_background.is_null()) {
@ -94,7 +94,7 @@ Card::Card(Type type, uint8_t value)
s_background->fill(Color::White);
auto image = Gfx::Bitmap::load_from_file("/res/icons/solitaire/buggie-deck.png");
ASSERT(!image.is_null());
VERIFY(!image.is_null());
float aspect_ratio = image->width() / static_cast<float>(image->height());
auto target_size = Gfx::IntSize(static_cast<int>(aspect_ratio * (height - 5)), height - 5);
@ -132,7 +132,7 @@ Card::Card(Type type, uint8_t value)
symbol = s_heart;
break;
default:
ASSERT_NOT_REACHED();
VERIFY_NOT_REACHED();
}
painter.draw_bitmap(
@ -152,7 +152,7 @@ Card::~Card()
void Card::draw(GUI::Painter& painter) const
{
ASSERT(!s_background.is_null());
VERIFY(!s_background.is_null());
painter.blit(position(), m_upside_down ? *s_background : *m_front, m_front->rect());
}