1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:47:35 +00:00

AK: Clear minimum when removing last node of RedBlackTree

This commit is contained in:
davidot 2022-02-10 12:24:49 +01:00 committed by Linus Groh
parent 2bddf157b1
commit fdbfe85a87
2 changed files with 15 additions and 0 deletions

View file

@ -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;
}