mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
AK: Clear minimum when removing last node of RedBlackTree
This commit is contained in:
parent
2bddf157b1
commit
fdbfe85a87
2 changed files with 15 additions and 0 deletions
|
@ -230,6 +230,7 @@ protected:
|
|||
// special case: deleting the only node
|
||||
if (m_size == 1) {
|
||||
m_root = nullptr;
|
||||
m_minimum = nullptr;
|
||||
m_size = 0;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue