Boost logo

Boost-Commit :

From: daniel_james_at_[hidden]
Date: 2008-04-16 13:35:34


Author: danieljames
Date: 2008-04-16 13:35:33 EDT (Wed, 16 Apr 2008)
New Revision: 44465
URL: http://svn.boost.org/trac/boost/changeset/44465

Log:
Call the erase methods in hash_table_data directly.

Text files modified:
   branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp | 14 +-------------
   branches/unordered/trunk/boost/unordered_map.hpp | 8 ++++----
   branches/unordered/trunk/boost/unordered_set.hpp | 8 ++++----
   3 files changed, 9 insertions(+), 21 deletions(-)

Modified: branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp (original)
+++ branches/unordered/trunk/boost/unordered/detail/hash_table_impl.hpp 2008-04-16 13:35:33 EDT (Wed, 16 Apr 2008)
@@ -1768,13 +1768,7 @@
 #endif
         public:
 
- // erase
-
- // no throw
- iterator_base erase(iterator_base const& r)
- {
- return data_.data::erase(r);
- }
+ // erase_key
 
             // strong exception safety
             size_type erase_key(key_type const& k)
@@ -1787,12 +1781,6 @@
                 return *it ? data_.erase_group(it, bucket) : 0;
             }
 
- // no throw
- iterator_base erase_range(iterator_base const& r1, iterator_base const& r2)
- {
- return data_.data::erase_range(r1, r2);
- }
-
             // count
             //
             // strong exception safety, no side effects

Modified: branches/unordered/trunk/boost/unordered_map.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered_map.hpp (original)
+++ branches/unordered/trunk/boost/unordered_map.hpp 2008-04-16 13:35:33 EDT (Wed, 16 Apr 2008)
@@ -218,7 +218,7 @@
 
         iterator erase(const_iterator position)
         {
- return iterator(base.erase(get(position)));
+ return iterator(base.data_.erase(get(position)));
         }
 
         size_type erase(const key_type& k)
@@ -228,7 +228,7 @@
 
         iterator erase(const_iterator first, const_iterator last)
         {
- return iterator(base.erase_range(get(first), get(last)));
+ return iterator(base.data_.erase_range(get(first), get(last)));
         }
 
         void clear()
@@ -571,7 +571,7 @@
 
         iterator erase(const_iterator position)
         {
- return iterator(base.erase(get(position)));
+ return iterator(base.data_.erase(get(position)));
         }
 
         size_type erase(const key_type& k)
@@ -581,7 +581,7 @@
 
         iterator erase(const_iterator first, const_iterator last)
         {
- return iterator(base.erase_range(get(first), get(last)));
+ return iterator(base.data_.erase_range(get(first), get(last)));
         }
 
         void clear()

Modified: branches/unordered/trunk/boost/unordered_set.hpp
==============================================================================
--- branches/unordered/trunk/boost/unordered_set.hpp (original)
+++ branches/unordered/trunk/boost/unordered_set.hpp 2008-04-16 13:35:33 EDT (Wed, 16 Apr 2008)
@@ -215,7 +215,7 @@
 
         iterator erase(const_iterator position)
         {
- return iterator(base.erase(get(position)));
+ return iterator(base.data_.erase(get(position)));
         }
 
         size_type erase(const key_type& k)
@@ -225,7 +225,7 @@
 
         iterator erase(const_iterator first, const_iterator last)
         {
- return iterator(base.erase_range(get(first), get(last)));
+ return iterator(base.data_.erase_range(get(first), get(last)));
         }
 
         void clear()
@@ -538,7 +538,7 @@
 
         iterator erase(const_iterator position)
         {
- return iterator(base.erase(get(position)));
+ return iterator(base.data_.erase(get(position)));
         }
 
         size_type erase(const key_type& k)
@@ -548,7 +548,7 @@
 
         iterator erase(const_iterator first, const_iterator last)
         {
- return iterator(base.erase_range(get(first), get(last)));
+ return iterator(base.data_.erase_range(get(first), get(last)));
         }
 
         void clear()


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk