1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:48:12 +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

@ -69,7 +69,7 @@ void ColumnsView::select_all()
return;
}
}
ASSERT_NOT_REACHED();
VERIFY_NOT_REACHED();
});
for (Column& column : columns_for_selection) {
@ -102,12 +102,12 @@ void ColumnsView::paint_event(PaintEvent& event)
auto& column = m_columns[i];
auto* next_column = i + 1 == m_columns.size() ? nullptr : &m_columns[i + 1];
ASSERT(column.width > 0);
VERIFY(column.width > 0);
int row_count = model()->row_count(column.parent_index);
for (int row = 0; row < row_count; row++) {
ModelIndex index = model()->index(row, m_model_column, column.parent_index);
ASSERT(index.is_valid());
VERIFY(index.is_valid());
bool is_selected_row = selection().contains(index);
@ -180,7 +180,7 @@ void ColumnsView::paint_event(PaintEvent& event)
void ColumnsView::push_column(const ModelIndex& parent_index)
{
ASSERT(model());
VERIFY(model());
// Drop columns at the end.
ModelIndex grandparent = model()->parent_index(parent_index);
@ -216,7 +216,7 @@ void ColumnsView::update_column_sizes()
column.width = 10;
for (int row = 0; row < row_count; row++) {
ModelIndex index = model()->index(row, m_model_column, column.parent_index);
ASSERT(index.is_valid());
VERIFY(index.is_valid());
auto text = index.data().to_string();
int row_width = icon_spacing() + icon_size() + icon_spacing() + font().width(text) + icon_spacing() + s_arrow_bitmap_width + icon_spacing();
if (row_width > column.width)