mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +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
|
@ -39,15 +39,15 @@ class TreeNode : public Weakable<T> {
|
|||
public:
|
||||
void ref()
|
||||
{
|
||||
ASSERT(!m_in_removed_last_ref);
|
||||
ASSERT(m_ref_count);
|
||||
VERIFY(!m_in_removed_last_ref);
|
||||
VERIFY(m_ref_count);
|
||||
++m_ref_count;
|
||||
}
|
||||
|
||||
void unref()
|
||||
{
|
||||
ASSERT(!m_in_removed_last_ref);
|
||||
ASSERT(m_ref_count);
|
||||
VERIFY(!m_in_removed_last_ref);
|
||||
VERIFY(m_ref_count);
|
||||
if (!--m_ref_count) {
|
||||
if constexpr (IsBaseOf<DOM::Node, T>::value) {
|
||||
m_in_removed_last_ref = true;
|
||||
|
@ -324,7 +324,7 @@ inline void TreeNode<T>::remove_all_children()
|
|||
template<typename T>
|
||||
inline NonnullRefPtr<T> TreeNode<T>::remove_child(NonnullRefPtr<T> node)
|
||||
{
|
||||
ASSERT(node->m_parent == this);
|
||||
VERIFY(node->m_parent == this);
|
||||
|
||||
if (m_first_child == node)
|
||||
m_first_child = node->m_next_sibling;
|
||||
|
@ -354,7 +354,7 @@ inline NonnullRefPtr<T> TreeNode<T>::remove_child(NonnullRefPtr<T> node)
|
|||
template<typename T>
|
||||
inline void TreeNode<T>::append_child(NonnullRefPtr<T> node, bool notify)
|
||||
{
|
||||
ASSERT(!node->m_parent);
|
||||
VERIFY(!node->m_parent);
|
||||
|
||||
if (!static_cast<T*>(this)->is_child_allowed(*node))
|
||||
return;
|
||||
|
@ -380,8 +380,8 @@ inline void TreeNode<T>::insert_before(NonnullRefPtr<T> node, RefPtr<T> child, b
|
|||
if (!child)
|
||||
return append_child(move(node), notify);
|
||||
|
||||
ASSERT(!node->m_parent);
|
||||
ASSERT(child->parent() == this);
|
||||
VERIFY(!node->m_parent);
|
||||
VERIFY(child->parent() == this);
|
||||
|
||||
if (!static_cast<T*>(this)->is_child_allowed(*node))
|
||||
return;
|
||||
|
@ -412,7 +412,7 @@ inline void TreeNode<T>::insert_before(NonnullRefPtr<T> node, RefPtr<T> child, b
|
|||
template<typename T>
|
||||
inline void TreeNode<T>::prepend_child(NonnullRefPtr<T> node)
|
||||
{
|
||||
ASSERT(!node->m_parent);
|
||||
VERIFY(!node->m_parent);
|
||||
|
||||
if (!static_cast<T*>(this)->is_child_allowed(*node))
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue