diff --git a/AK/RedBlackTree.h b/AK/RedBlackTree.h index 713888f7f46..e88813402e7 100644 --- a/AK/RedBlackTree.h +++ b/AK/RedBlackTree.h @@ -521,10 +521,8 @@ public: void clear() { - if (this->m_root) { - delete this->m_root; - this->m_root = nullptr; - } + delete this->m_root; + this->m_root = nullptr; this->m_minimum = nullptr; this->m_size = 0; } @@ -542,10 +540,8 @@ private: ~Node() { - if (this->left_child) - delete this->left_child; - if (this->right_child) - delete this->right_child; + delete this->left_child; + delete this->right_child; } }; };