Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67292 - trunk/boost/spirit/home/support/utree/detail
From: hartmut.kaiser_at_[hidden]
Date: 2010-12-17 21:34:09


Author: hkaiser
Date: 2010-12-17 21:34:08 EST (Fri, 17 Dec 2010)
New Revision: 67292
URL: http://svn.boost.org/trac/boost/changeset/67292

Log:
Spirit: one minor fix, which should speed up things slightly
Text files modified:
   trunk/boost/spirit/home/support/utree/detail/utree_detail2.hpp | 7 +++++--
   1 files changed, 5 insertions(+), 2 deletions(-)

Modified: trunk/boost/spirit/home/support/utree/detail/utree_detail2.hpp
==============================================================================
--- trunk/boost/spirit/home/support/utree/detail/utree_detail2.hpp (original)
+++ trunk/boost/spirit/home/support/utree/detail/utree_detail2.hpp 2010-12-17 21:34:08 EST (Fri, 17 Dec 2010)
@@ -953,9 +953,12 @@
         if (get_type() == type::reference_type)
             return p->insert(pos, val);
         ensure_list_type();
- l.insert(val, pos);
- if (!pos.node)
+ if (!pos.node)
+ {
+ push_back(val);
             return begin();
+ }
+ l.insert(val, pos);
         return utree::iterator(pos.node->prev, pos.node->prev->prev);
     }
 


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