mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +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:
parent
b33a6a443e
commit
5d180d1f99
725 changed files with 3448 additions and 3448 deletions
|
@ -1352,7 +1352,7 @@ void Editor::reposition_cursor(bool to_end)
|
|||
auto line = cursor_line() - 1;
|
||||
auto column = offset_in_line();
|
||||
|
||||
ASSERT(column + m_origin_column <= m_num_columns);
|
||||
VERIFY(column + m_origin_column <= m_num_columns);
|
||||
VT::move_absolute(line + m_origin_row, column + m_origin_column);
|
||||
|
||||
if (line + m_origin_row > m_num_lines) {
|
||||
|
|
|
@ -331,7 +331,7 @@ private:
|
|||
|
||||
void restore()
|
||||
{
|
||||
ASSERT(m_initialized);
|
||||
VERIFY(m_initialized);
|
||||
tcsetattr(0, TCSANOW, &m_default_termios);
|
||||
m_initialized = false;
|
||||
for (auto id : m_signal_handlers)
|
||||
|
|
|
@ -227,7 +227,7 @@ void Editor::enter_search()
|
|||
{
|
||||
if (m_is_searching) {
|
||||
// How did we get here?
|
||||
ASSERT_NOT_REACHED();
|
||||
VERIFY_NOT_REACHED();
|
||||
} else {
|
||||
m_is_searching = true;
|
||||
m_search_offset = 0;
|
||||
|
@ -494,7 +494,7 @@ void Editor::case_change_word(Editor::CaseChangeOp change_op)
|
|||
if (change_op == CaseChangeOp::Uppercase || (change_op == CaseChangeOp::Capital && m_cursor == start)) {
|
||||
m_buffer[m_cursor] = toupper(m_buffer[m_cursor]);
|
||||
} else {
|
||||
ASSERT(change_op == CaseChangeOp::Lowercase || (change_op == CaseChangeOp::Capital && m_cursor > start));
|
||||
VERIFY(change_op == CaseChangeOp::Lowercase || (change_op == CaseChangeOp::Capital && m_cursor > start));
|
||||
m_buffer[m_cursor] = tolower(m_buffer[m_cursor]);
|
||||
}
|
||||
++m_cursor;
|
||||
|
|
|
@ -44,7 +44,7 @@ void KeyCallbackMachine::key_pressed(Editor& editor, Key key)
|
|||
dbgln("Key<{}, {}> pressed, seq_length={}, {} things in the matching vector", key.key, key.modifiers, m_sequence_length, m_current_matching_keys.size());
|
||||
#endif
|
||||
if (m_sequence_length == 0) {
|
||||
ASSERT(m_current_matching_keys.is_empty());
|
||||
VERIFY(m_current_matching_keys.is_empty());
|
||||
|
||||
for (auto& it : m_key_callbacks) {
|
||||
if (it.key.first() == key)
|
||||
|
|
|
@ -53,7 +53,7 @@ void SuggestionManager::set_suggestions(Vector<CompletionSuggestion>&& suggestio
|
|||
|
||||
// make sure we were not given invalid suggestions
|
||||
for (auto& suggestion : m_suggestions)
|
||||
ASSERT(suggestion.is_valid);
|
||||
VERIFY(suggestion.is_valid);
|
||||
|
||||
size_t common_suggestion_prefix { 0 };
|
||||
if (m_suggestions.size() == 1) {
|
||||
|
|
|
@ -183,7 +183,7 @@ bool XtermSuggestionDisplay::cleanup()
|
|||
|
||||
size_t XtermSuggestionDisplay::fit_to_page_boundary(size_t selection_index)
|
||||
{
|
||||
ASSERT(m_pages.size() > 0);
|
||||
VERIFY(m_pages.size() > 0);
|
||||
size_t index = 0;
|
||||
|
||||
auto* match = binary_search(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue