Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55695 - sandbox/memory/boost/memory
From: xushiweizh_at_[hidden]
Date: 2009-08-21 07:38:45


Author: xushiwei
Date: 2009-08-21 07:38:44 EDT (Fri, 21 Aug 2009)
New Revision: 55695
URL: http://svn.boost.org/trac/boost/changeset/55695

Log:
remove NS_BOOST_MEMORY::swap
Text files modified:
   sandbox/memory/boost/memory/basic.hpp | 13 ++++---------
   1 files changed, 4 insertions(+), 9 deletions(-)

Modified: sandbox/memory/boost/memory/basic.hpp
==============================================================================
--- sandbox/memory/boost/memory/basic.hpp (original)
+++ sandbox/memory/boost/memory/basic.hpp 2009-08-21 07:38:44 EDT (Fri, 21 Aug 2009)
@@ -214,18 +214,13 @@
 
 NS_BOOST_MEMORY_BEGIN
 
-inline void swap(void* a, void* b, size_t cb)
-{
- void* t = _alloca(cb);
- memcpy(t, a, cb);
- memcpy(a, b, cb);
- memcpy(b, t, cb);
-}
-
 template <class Type>
 void swap_object(Type* a, Type* b)
 {
- swap(a, b, sizeof(Type));
+ void* t = _alloca(sizeof(Type));
+ memcpy(t, a, sizeof(Type));
+ memcpy(a, b, sizeof(Type));
+ memcpy(b, t, sizeof(Type));
 }
 
 NS_BOOST_MEMORY_END


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