forked from boostorg/unordered
Update implementation to use erase_node()
where applicable
This commit is contained in:
@ -1856,18 +1856,14 @@ namespace boost {
|
|||||||
typename unordered_map<K, T, H, P, A>::iterator
|
typename unordered_map<K, T, H, P, A>::iterator
|
||||||
unordered_map<K, T, H, P, A>::erase(iterator position)
|
unordered_map<K, T, H, P, A>::erase(iterator position)
|
||||||
{
|
{
|
||||||
const_iterator last = position;
|
return table_.erase_node(position);
|
||||||
++last;
|
|
||||||
return table_.erase_nodes_range(position, last);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
typename unordered_map<K, T, H, P, A>::iterator
|
typename unordered_map<K, T, H, P, A>::iterator
|
||||||
unordered_map<K, T, H, P, A>::erase(const_iterator position)
|
unordered_map<K, T, H, P, A>::erase(const_iterator position)
|
||||||
{
|
{
|
||||||
const_iterator last = position;
|
return table_.erase_node(position);
|
||||||
++last;
|
|
||||||
return table_.erase_nodes_range(position, last);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
@ -2340,9 +2336,7 @@ namespace boost {
|
|||||||
unordered_multimap<K, T, H, P, A>::erase(iterator position)
|
unordered_multimap<K, T, H, P, A>::erase(iterator position)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(position != this->end());
|
BOOST_ASSERT(position != this->end());
|
||||||
iterator next = position;
|
return table_.erase_node(position);
|
||||||
++next;
|
|
||||||
return table_.erase_nodes_range(position, next);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
@ -2350,9 +2344,7 @@ namespace boost {
|
|||||||
unordered_multimap<K, T, H, P, A>::erase(const_iterator position)
|
unordered_multimap<K, T, H, P, A>::erase(const_iterator position)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(position != this->end());
|
BOOST_ASSERT(position != this->end());
|
||||||
const_iterator next = position;
|
return table_.erase_node(position);
|
||||||
++next;
|
|
||||||
return table_.erase_nodes_range(position, next);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K, class T, class H, class P, class A>
|
template <class K, class T, class H, class P, class A>
|
||||||
|
@ -1457,9 +1457,7 @@ namespace boost {
|
|||||||
typename unordered_set<T, H, P, A>::iterator
|
typename unordered_set<T, H, P, A>::iterator
|
||||||
unordered_set<T, H, P, A>::erase(const_iterator position)
|
unordered_set<T, H, P, A>::erase(const_iterator position)
|
||||||
{
|
{
|
||||||
const_iterator last = position;
|
return table_.erase_node(position);
|
||||||
++last;
|
|
||||||
return table_.erase_nodes_range(position, last);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class H, class P, class A>
|
template <class T, class H, class P, class A>
|
||||||
@ -1853,10 +1851,7 @@ namespace boost {
|
|||||||
unordered_multiset<T, H, P, A>::erase(const_iterator position)
|
unordered_multiset<T, H, P, A>::erase(const_iterator position)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(position != this->end());
|
BOOST_ASSERT(position != this->end());
|
||||||
iterator next = position;
|
return table_.erase_node(position);
|
||||||
++next;
|
|
||||||
table_.erase_nodes_range(position, next);
|
|
||||||
return next;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class H, class P, class A>
|
template <class T, class H, class P, class A>
|
||||||
|
Reference in New Issue
Block a user