Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71570 - sandbox/block_ptr/boost
From: phil_at_[hidden]
Date: 2011-04-28 16:36:35


Author: pbouchard
Date: 2011-04-28 16:36:34 EDT (Thu, 28 Apr 2011)
New Revision: 71570
URL: http://svn.boost.org/trac/boost/changeset/71570

Log:
* Changed recursive redir to iterative redir
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 16:36:34 EDT (Thu, 28 Apr 2011)
@@ -135,8 +135,10 @@
         
     block_header * redir() const
     {
- if (redir_ == this) return redir_;
- else return redir_ = redir_->redir();
+ while (redir_ != redir_->redir_)
+ redir_ = redir_->redir_;
+
+ return redir_;
     }
         
         


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