summaryrefslogtreecommitdiff
path: root/Userland/Games/Solitaire/Card.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-02-23 20:42:32 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-23 20:56:54 +0100
commit5d180d1f996ead27f9c5cb3db7f91e293de34d9d (patch)
treee881854dac5d749518562970d6194a0ef65736ec /Userland/Games/Solitaire/Card.cpp
parentb33a6a443e700cd80325d312f21c985b0687bb97 (diff)
downloadserenity-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/Games/Solitaire/Card.cpp')
-rw-r--r--Userland/Games/Solitaire/Card.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Games/Solitaire/Card.cpp b/Userland/Games/Solitaire/Card.cpp
index 23c3473632..1887393bb0 100644
--- a/Userland/Games/Solitaire/Card.cpp
+++ b/Userland/Games/Solitaire/Card.cpp
@@ -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());
}