util/IntrusiveTreeSet: update the counter, fixing constant_time_size

This commit is contained in:
Max Kellermann 2024-11-12 08:17:15 +01:00 committed by Max Kellermann
parent 8db14c9cb3
commit 7a6672b7ed
1 changed files with 3 additions and 0 deletions

View File

@ -365,6 +365,8 @@ public:
SetRoot(root);
++counter;
return iterator_to(value);
}
@ -374,6 +376,7 @@ public:
auto *next = RedBlackTreeNode::GetNextNode(i.node);
Cast(i.node)->unlink();
--counter;
return iterator{next};
}