Boost logo

Boost-Commit :

From: xushiweizh_at_[hidden]
Date: 2008-04-30 02:31:52


Author: xushiwei
Date: 2008-04-30 02:31:51 EDT (Wed, 30 Apr 2008)
New Revision: 44915
URL: http://svn.boost.org/trac/boost/changeset/44915

Log:
ticket #1885: gc_alloc::swap
Text files modified:
   sandbox/memory/boost/memory/gc_alloc.hpp | 2 +-
   sandbox/memory/boost/memory/stl/queue.hpp | 4 ++++
   2 files changed, 5 insertions(+), 1 deletions(-)

Modified: sandbox/memory/boost/memory/gc_alloc.hpp
==============================================================================
--- sandbox/memory/boost/memory/gc_alloc.hpp (original)
+++ sandbox/memory/boost/memory/gc_alloc.hpp 2008-04-30 02:31:51 EDT (Wed, 30 Apr 2008)
@@ -290,9 +290,9 @@
                 std::swap(m_begin, o.m_begin);
                 std::swap(m_end, o.m_end);
                 std::swap(m_blockList, o.m_blockList);
- std::swap(m_freeList, o.m_freeList);
                 std::swap(m_destroyChain, o.m_destroyChain);
                 m_alloc.swap(o.m_alloc);
+ m_freeList.swap(o.m_freeList);
                 m_hugeAlloc.swap(o.m_hugeAlloc);
         }
 

Modified: sandbox/memory/boost/memory/stl/queue.hpp
==============================================================================
--- sandbox/memory/boost/memory/stl/queue.hpp (original)
+++ sandbox/memory/boost/memory/stl/queue.hpp 2008-04-30 02:31:51 EDT (Wed, 30 Apr 2008)
@@ -90,6 +90,10 @@
   void clear() {
         m_coll.clear();
   }
+ void swap(priority_queue& o) {
+ m_coll.swap(o.m_coll);
+ std::swap(m_pred, o.m_pred);
+ }
 };
 
 // -------------------------------------------------------------------------


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