util/IntrusiveTreeSet: update the counter, fixing constant_time_size
This commit is contained in:
parent
8db14c9cb3
commit
7a6672b7ed
|
@ -365,6 +365,8 @@ public:
|
||||||
|
|
||||||
SetRoot(root);
|
SetRoot(root);
|
||||||
|
|
||||||
|
++counter;
|
||||||
|
|
||||||
return iterator_to(value);
|
return iterator_to(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,6 +376,7 @@ public:
|
||||||
|
|
||||||
auto *next = RedBlackTreeNode::GetNextNode(i.node);
|
auto *next = RedBlackTreeNode::GetNextNode(i.node);
|
||||||
Cast(i.node)->unlink();
|
Cast(i.node)->unlink();
|
||||||
|
--counter;
|
||||||
return iterator{next};
|
return iterator{next};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue