Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80560 - trunk/boost/unordered/detail
From: dnljms_at_[hidden]
Date: 2012-09-17 14:58:29


Author: danieljames
Date: 2012-09-17 14:58:28 EDT (Mon, 17 Sep 2012)
New Revision: 80560
URL: http://svn.boost.org/trac/boost/changeset/80560

Log:
Unordered: `delete_buckets` works when `buckets_` is null.
Text files modified:
   trunk/boost/unordered/detail/table.hpp | 8 ++++----
   1 files changed, 4 insertions(+), 4 deletions(-)

Modified: trunk/boost/unordered/detail/table.hpp
==============================================================================
--- trunk/boost/unordered/detail/table.hpp (original)
+++ trunk/boost/unordered/detail/table.hpp 2012-09-17 14:58:28 EDT (Mon, 17 Sep 2012)
@@ -712,7 +712,7 @@
 
                 // Delete everything with current allocators before assigning
                 // the new ones.
- if (buckets_) delete_buckets();
+ delete_buckets();
                 allocators_.assign(x.allocators_);
 
                 // Copy over other data, all no throw.
@@ -743,7 +743,7 @@
 
         void move_assign(table& x, true_type)
         {
- if(buckets_) delete_buckets();
+ delete_buckets();
             allocators_.move_assign(x.allocators_);
             move_assign_no_alloc(x);
         }
@@ -751,7 +751,7 @@
         void move_assign(table& x, false_type)
         {
             if (node_alloc() == x.node_alloc()) {
- if(buckets_) delete_buckets();
+ delete_buckets();
                 move_assign_no_alloc(x);
             }
             else {
@@ -881,7 +881,7 @@
         using namespace std;
 
         if(!size_) {
- if(buckets_) delete_buckets();
+ delete_buckets();
             bucket_count_ = policy::new_bucket_count(min_buckets);
         }
         else {


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