Skip to content

Commit

Permalink
util/IntrusiveTreeSet: update the counter, fixing constant_time_size
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Nov 12, 2024
1 parent 442daf0 commit e5eb6a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/util/IntrusiveTreeSet.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ public:

SetRoot(root);

++counter;

return iterator_to(value);
}

Expand All @@ -374,6 +376,7 @@ public:

auto *next = RedBlackTreeNode::GetNextNode(i.node);
Cast(i.node)->unlink();
--counter;
return iterator{next};
}

Expand Down

0 comments on commit e5eb6a7

Please sign in to comment.