mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 04:13:11 +00:00
AK: Remove unnecessary null checks in RedBlackTree
This commit is contained in:
parent
cd285894b2
commit
a702b6ec42
|
@ -521,10 +521,8 @@ public:
|
|||
|
||||
void clear()
|
||||
{
|
||||
if (this->m_root) {
|
||||
delete this->m_root;
|
||||
this->m_root = nullptr;
|
||||
}
|
||||
this->m_minimum = nullptr;
|
||||
this->m_size = 0;
|
||||
}
|
||||
|
@ -542,9 +540,7 @@ private:
|
|||
|
||||
~Node()
|
||||
{
|
||||
if (this->left_child)
|
||||
delete this->left_child;
|
||||
if (this->right_child)
|
||||
delete this->right_child;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue