replaced illegal STL

This commit is contained in:
2024-05-01 03:08:31 +00:00
parent 27ed3f9a55
commit 6c20530cc8
5 changed files with 16 additions and 13 deletions

View File

@ -711,6 +711,12 @@ class map {
RedBlackTreeNodeType::DeleteNode(pos.raw_pointer, tree_root);
--node_count;
}
void erase(const Key &key) {
RedBlackTreeNodeType *result = tree_root->Find(key);
if (result == nullptr) return;
RedBlackTreeNodeType::DeleteNode(result, tree_root);
--node_count;
}
/**
* Returns the number of elements with key
* that compares equivalent to the specified argument,