Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57593 - in trunk/boost/xpressive: . detail/utility
From: eric_at_[hidden]
Date: 2009-11-11 21:41:20


Author: eric_niebler
Date: 2009-11-11 21:41:19 EST (Wed, 11 Nov 2009)
New Revision: 57593
URL: http://svn.boost.org/trac/boost/changeset/57593

Log:
remove tabs, s/malloc/operator new/
Text files modified:
   trunk/boost/xpressive/detail/utility/sequence_stack.hpp | 7 +++----
   trunk/boost/xpressive/match_results.hpp | 12 ++++++------
   2 files changed, 9 insertions(+), 10 deletions(-)

Modified: trunk/boost/xpressive/detail/utility/sequence_stack.hpp
==============================================================================
--- trunk/boost/xpressive/detail/utility/sequence_stack.hpp (original)
+++ trunk/boost/xpressive/detail/utility/sequence_stack.hpp 2009-11-11 21:41:19 EST (Wed, 11 Nov 2009)
@@ -35,12 +35,11 @@
     static T *allocate(std::size_t size, T const &t)
     {
         std::size_t i = 0;
- T *p = (T *)std::malloc(size * sizeof(T));
- if(!p) throw std::bad_alloc();
+ T *p = (T *)::operator new(size * sizeof(T));
         try
         {
             for(; i < size; ++i)
- new((void *)(p+i)) T(t);
+ ::new((void *)(p+i)) T(t);
         }
         catch(...)
         {
@@ -54,7 +53,7 @@
     {
         while(i-- > 0)
             (p+i)->~T();
- std::free(p);
+ ::operator delete(p);
     }
 
     struct chunk

Modified: trunk/boost/xpressive/match_results.hpp
==============================================================================
--- trunk/boost/xpressive/match_results.hpp (original)
+++ trunk/boost/xpressive/match_results.hpp 2009-11-11 21:41:19 EST (Wed, 11 Nov 2009)
@@ -493,11 +493,11 @@
 
     /// Returns a reference to the sub_match object representing the character sequence from
     /// the start of the string being matched/searched, to the start of the match found.
- ///
+ ///
     /// \pre (*this)[0].matched is true
     const_reference prefix() const
     {
- return this->prefix_ ? *this->prefix_ : this->sub_matches_[this->sub_matches_.size()];
+ return this->prefix_ ? *this->prefix_ : this->sub_matches_[this->sub_matches_.size()];
     }
 
     /// Returns a reference to the sub_match object representing the character sequence from
@@ -506,7 +506,7 @@
     /// \pre (*this)[0].matched is true
     const_reference suffix() const
     {
- return this->suffix_ ? *this->suffix_ : this->sub_matches_[this->sub_matches_.size()];
+ return this->suffix_ ? *this->suffix_ : this->sub_matches_[this->sub_matches_.size()];
     }
 
     /// Returns a starting iterator that enumerates over all the marked sub-expression matches
@@ -1332,9 +1332,9 @@
 
     regex_id_type regex_id_;
     detail::sub_match_vector<BidiIter> sub_matches_;
- boost::optional<BidiIter> base_;
- boost::optional<sub_match<BidiIter> > prefix_;
- boost::optional<sub_match<BidiIter> > suffix_;
+ boost::optional<BidiIter> base_;
+ boost::optional<sub_match<BidiIter> > prefix_;
+ boost::optional<sub_match<BidiIter> > suffix_;
     nested_results_type nested_results_;
     intrusive_ptr<extras_type> extras_ptr_;
     intrusive_ptr<detail::traits<char_type> const> traits_;


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