|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71577 - sandbox/block_ptr/boost
From: phil_at_[hidden]
Date: 2011-04-28 20:51:29
Author: pbouchard
Date: 2011-04-28 20:51:28 EDT (Thu, 28 Apr 2011)
New Revision: 71577
URL: http://svn.boost.org/trac/boost/changeset/71577
Log:
* Small opt
Text files modified:
sandbox/block_ptr/boost/block_ptr.hpp | 6 ++++--
1 files changed, 4 insertions(+), 2 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-04-28 20:51:28 EDT (Thu, 28 Apr 2011)
@@ -152,12 +152,14 @@
void redir(block_header * p)
{
- if (redir_ != p->redir())
+ block_header * q = p->redir();
+
+ if (redir_ != q)
{
#ifndef BOOST_DISABLE_THREADS
mutex::scoped_lock scoped_lock(mutex_);
#endif
- redir_ = p->redir();
+ redir_ = q;
redir_->includes_.merge(includes_);
redir_->elements_.merge(elements_);
new (& redir_->count_) count_type(redir_->count_ + count_); /**< Hack */
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