|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r71472 - sandbox/mm_ptr/boost
From: phil_at_[hidden]
Date: 2011-04-24 23:07:51
Author: pbouchard
Date: 2011-04-24 23:07:51 EDT (Sun, 24 Apr 2011)
New Revision: 71472
URL: http://svn.boost.org/trac/boost/changeset/71472
Log:
* Code cleanup in release()
Text files modified:
sandbox/mm_ptr/boost/mm_ptr.hpp | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
Modified: sandbox/mm_ptr/boost/mm_ptr.hpp
==============================================================================
--- sandbox/mm_ptr/boost/mm_ptr.hpp (original)
+++ sandbox/mm_ptr/boost/mm_ptr.hpp 2011-04-24 23:07:51 EDT (Sun, 24 Apr 2011)
@@ -374,25 +374,17 @@
void release(bool d)
{
+ base::reset();
+
if (! owned_base::pool_.is_from(this))
if (ps_->release())
- {
- base::po_ = 0;
-
if (! d)
new (ps_) mm_header();
else
delete ps_;
- }
else
- {
- base::reset();
-
if (! d)
ps_ = new mm_header();
- }
- else
- base::reset();
}
@@ -411,7 +403,7 @@
for (intrusive_list::iterator<owned_base, & owned_base::init_tag_> i = p->inits_.begin(); i != p->inits_.end(); ++ i)
{
i->init_ = true;
- ps_->elements()->push_front(& i->mm_tag_);
+ ps_->elements()->push_back(& i->mm_tag_);
// iterate mm_ptr elements
for (intrusive_stack::iterator<mm_ptr, & mm_ptr::pn_> j = i->ptrs_.begin(), k; k = j, j != i->ptrs_.end(); j = k)
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