Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r53299 - trunk/boost/spirit/home/support/detail/lexer
From: jamin.hanson_at_[hidden]
Date: 2009-05-27 04:56:20


Author: ben_hanson
Date: 2009-05-27 04:56:18 EDT (Wed, 27 May 2009)
New Revision: 53299
URL: http://svn.boost.org/trac/boost/changeset/53299

Log:
Removed unneeded typedef.
Text files modified:
   trunk/boost/spirit/home/support/detail/lexer/rules.hpp | 16 +++++++++++-----
   1 files changed, 11 insertions(+), 5 deletions(-)

Modified: trunk/boost/spirit/home/support/detail/lexer/rules.hpp
==============================================================================
--- trunk/boost/spirit/home/support/detail/lexer/rules.hpp (original)
+++ trunk/boost/spirit/home/support/detail/lexer/rules.hpp 2009-05-27 04:56:18 EDT (Wed, 27 May 2009)
@@ -81,10 +81,9 @@
     typedef std::deque<string_pair> string_pair_deque;
     typedef std::map<string, std::size_t> string_size_t_map;
     typedef std::pair<string, std::size_t> string_size_t_pair;
- typedef std::pair<std::size_t, std::size_t> unique_id_key;
 
     basic_rules (const regex_flags flags_ = dot_not_newline,
- std::size_t (*counter_ptr_)() = 0) :
+ std::size_t (*counter_ptr_) () = 0) :
         _flags (flags_),
         _counter (0),
         _counter_ptr (counter_ptr_)
@@ -247,7 +246,7 @@
 
     std::size_t add (const string &regex_, const std::size_t id_)
     {
- const std::size_t counter_ = next_unique_id();
+ const std::size_t counter_ = next_unique_id ();
 
         check_for_invalid_id (id_);
         _regexes[0].push_back (regex_);
@@ -405,7 +404,7 @@
     id_vector_deque _states;
     regex_flags _flags;
     std::size_t _counter;
- std::size_t (*_counter_ptr)();
+ std::size_t (*_counter_ptr) ();
     std::locale _locale;
     string_deque _lexer_state_names;
 
@@ -518,15 +517,22 @@
 
             if (uid_ == npos)
             {
- std::size_t counter_ = next_unique_id();
+ const std::size_t counter_ = next_unique_id ();
+
                 if (first_counter_ == npos)
+ {
                     first_counter_ = counter_;
+ }
+
                 _unique_ids[curr_].push_back (counter_);
             }
             else
             {
                 if (first_counter_ == npos)
+ {
                     first_counter_ = uid_;
+ }
+
                 _unique_ids[curr_].push_back (uid_);
             }
 


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