|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71571 - sandbox/block_ptr/boost
From: phil_at_[hidden]
Date: 2011-04-28 16:46:11
Author: pbouchard
Date: 2011-04-28 16:46:10 EDT (Thu, 28 Apr 2011)
New Revision: 71571
URL: http://svn.boost.org/trac/boost/changeset/71571
Log:
* Removed mutability of redir_
Text files modified:
sandbox/block_ptr/boost/block_ptr.hpp | 12 +++++++-----
1 files changed, 7 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-04-28 16:46:10 EDT (Thu, 28 Apr 2011)
@@ -65,7 +65,7 @@
typedef detail::atomic_count count_type;
count_type 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.*/
+ block_header * redir_; /**< Redirection in the case of an union multiple sets.*/
intrusive_list includes_; /**< List of all sets of an union. */
intrusive_list elements_; /**< List of all pointee objects belonging to a @c block_header . */
@@ -128,17 +128,19 @@
/**
- Recursive search for the @c block_header header of an union.
+ Search for the @c block_header header of an union.
@return @c block_header responsible for managing the counter of an union.
*/
block_header * redir() const
{
- while (redir_ != redir_->redir_)
- redir_ = redir_->redir_;
+ block_header * p = redir_;
+
+ while (p != p->redir_)
+ p = p->redir_;
- return redir_;
+ return p;
}
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