|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72295 - sandbox/block_ptr/boost
From: phil_at_[hidden]
Date: 2011-05-30 21:40:44
Author: pbouchard
Date: 2011-05-30 21:40:43 EDT (Mon, 30 May 2011)
New Revision: 72295
URL: http://svn.boost.org/trac/boost/changeset/72295
Log:
* Removed atomic count
Text files modified:
sandbox/block_ptr/boost/block_ptr.hpp | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
Modified: sandbox/block_ptr/boost/block_ptr.hpp
==============================================================================
--- sandbox/block_ptr/boost/block_ptr.hpp (original)
+++ sandbox/block_ptr/boost/block_ptr.hpp 2011-05-30 21:40:43 EDT (Mon, 30 May 2011)
@@ -32,7 +32,6 @@
#include <iostream>
#include <boost/pool/pool_alloc.hpp>
#include <boost/type_traits/add_pointer.hpp>
-#include <boost/smart_ptr/detail/atomic_count.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
@@ -63,9 +62,7 @@
struct block_header
{
- typedef detail::atomic_count count_type;
-
- count_type count_; /**< Count of the number of pointers from the stack referencing the same @c block_header .*/
+ long count_; /**< Count of the number of pointers from the stack referencing the same @c block_header .*/
mutable block_header * redir_; /**< Redirection in the case of an union multiple sets.*/
bool destroy_; /**< Destruction sequence initiated. */
@@ -158,7 +155,7 @@
redir_ = p;
redir_->includes_.merge(includes_);
redir_->elements_.merge(elements_);
- new (& redir_->count_) count_type(redir_->count_ + count_); /**< Hack */
+ redir_->count_ += count_;
}
}
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