summaryrefslogtreecommitdiff
path: root/Userland/Demos
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/Demos
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/Demos')
-rw-r--r--Userland/Demos/CatDog/main.cpp4
-rw-r--r--Userland/Demos/Eyes/EyesWidget.cpp6
-rw-r--r--Userland/Demos/LibGfxScaleDemo/main.cpp2
-rw-r--r--Userland/Demos/WidgetGallery/main.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Demos/CatDog/main.cpp b/Userland/Demos/CatDog/main.cpp
index 7238b2c0a7..cc0c9576f8 100644
--- a/Userland/Demos/CatDog/main.cpp
+++ b/Userland/Demos/CatDog/main.cpp
@@ -150,9 +150,9 @@ public:
void track_cursor_globally()
{
- ASSERT(window());
+ VERIFY(window());
auto window_id = window()->window_id();
- ASSERT(window_id >= 0);
+ VERIFY(window_id >= 0);
set_global_cursor_tracking(true);
GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetGlobalCursorTracking>(window_id, true);
diff --git a/Userland/Demos/Eyes/EyesWidget.cpp b/Userland/Demos/Eyes/EyesWidget.cpp
index c31d4782e1..6372c9e137 100644
--- a/Userland/Demos/Eyes/EyesWidget.cpp
+++ b/Userland/Demos/Eyes/EyesWidget.cpp
@@ -37,9 +37,9 @@ EyesWidget::~EyesWidget()
void EyesWidget::track_cursor_globally()
{
- ASSERT(window());
+ VERIFY(window());
auto window_id = window()->window_id();
- ASSERT(window_id >= 0);
+ VERIFY(window_id >= 0);
set_global_cursor_tracking(true);
GUI::WindowServerConnection::the().send_sync<Messages::WindowServer::SetGlobalCursorTracking>(window_id, true);
@@ -124,7 +124,7 @@ Gfx::IntPoint EyesWidget::pupil_center(Gfx::IntRect& eyeball_bounds) const
(slope_squared / width_squared + 1 / height_squared)
);
} else {
- ASSERT_NOT_REACHED();
+ VERIFY_NOT_REACHED();
}
// clang-format on
diff --git a/Userland/Demos/LibGfxScaleDemo/main.cpp b/Userland/Demos/LibGfxScaleDemo/main.cpp
index cf46179701..9a60b911d1 100644
--- a/Userland/Demos/LibGfxScaleDemo/main.cpp
+++ b/Userland/Demos/LibGfxScaleDemo/main.cpp
@@ -110,7 +110,7 @@ void Canvas::draw(Gfx::Painter& painter)
// grid does not have an alpha channel.
auto grid = Gfx::Bitmap::load_from_file("/res/wallpapers/grid.png");
- ASSERT(!grid->has_alpha_channel());
+ VERIFY(!grid->has_alpha_channel());
painter.fill_rect({ 25, 122, 62, 20 }, Color::Green);
painter.blit({ 25, 122 }, *grid, { (grid->width() - 62) / 2, (grid->height() - 20) / 2 + 40, 62, 20 }, 0.9);
diff --git a/Userland/Demos/WidgetGallery/main.cpp b/Userland/Demos/WidgetGallery/main.cpp
index e94072146a..ab4782cdf1 100644
--- a/Userland/Demos/WidgetGallery/main.cpp
+++ b/Userland/Demos/WidgetGallery/main.cpp
@@ -66,8 +66,8 @@ public:
virtual int column_count(const GUI::ModelIndex&) const override { return 1; }
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_model_items.at(index.row());
return {};