From 10a3b70df1e6aa70b22f4865bcb2382b906e138c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 21 Mar 2006 18:36:44 +0000 Subject: [PATCH] suppress gcc -Wshadow warnings. [SVN r33426] --- include/boost/regex/v4/basic_regex_creator.hpp | 6 +++--- include/boost/regex/v4/basic_regex_parser.hpp | 13 ++++++------- include/boost/regex/v4/match_results.hpp | 15 ++++++++------- include/boost/regex/v4/perl_matcher.hpp | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/boost/regex/v4/basic_regex_creator.hpp b/include/boost/regex/v4/basic_regex_creator.hpp index ac0408ab..22a23775 100644 --- a/include/boost/regex/v4/basic_regex_creator.hpp +++ b/include/boost/regex/v4/basic_regex_creator.hpp @@ -194,10 +194,10 @@ public: { return static_cast(static_cast(static_cast(base) + off)); } - void init(unsigned flags) + void init(unsigned l_flags) { - m_pdata->m_flags = flags; - m_icase = flags & regex_constants::icase; + m_pdata->m_flags = l_flags; + m_icase = l_flags & regex_constants::icase; } regbase::flag_type flags() { diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index 116a5194..50102751 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -94,10 +94,10 @@ basic_regex_parser::basic_regex_parser(regex_data* } template -void basic_regex_parser::parse(const charT* p1, const charT* p2, unsigned flags) +void basic_regex_parser::parse(const charT* p1, const charT* p2, unsigned l_flags) { - // pass flags on to base class: - this->init(flags); + // pass l_flags on to base class: + this->init(l_flags); // set up pointers: m_position = m_base = p1; m_end = p2; @@ -108,7 +108,7 @@ void basic_regex_parser::parse(const charT* p1, const charT* p2, return; } // select which parser to use: - switch(flags & regbase::main_option_type) + switch(l_flags & regbase::main_option_type) { case regbase::perl_syntax_group: m_parser_proc = &basic_regex_parser::parse_extended; @@ -127,8 +127,8 @@ void basic_regex_parser::parse(const charT* p1, const charT* p2, // Unwind our alternatives: // unwind_alts(-1); - // reset flags as a global scope (?imsx) may have altered them: - this->flags(flags); + // reset l_flags as a global scope (?imsx) may have altered them: + this->flags(l_flags); // if we haven't gobbled up all the characters then we must // have had an unexpected ')' : if(!result) @@ -1244,7 +1244,6 @@ void basic_regex_parser::parse_set_literal(basic_char_set digraph basic_regex_parser::get_next_set_literal(basic_char_set& char_set) { - typedef typename traits::string_type string_type; digraph result; switch(this->m_traits.syntax_type(*m_position)) { diff --git a/include/boost/regex/v4/match_results.hpp b/include/boost/regex/v4/match_results.hpp index 024cd03c..3917d704 100644 --- a/include/boost/regex/v4/match_results.hpp +++ b/include/boost/regex/v4/match_results.hpp @@ -310,8 +310,8 @@ void BOOST_REGEX_CALL match_results::maybe_assign(const // whether a sub-expression is a valid match, because partial matches set this // to false for sub-expression 0. // - BidiIterator end = this->suffix().second; - BidiIterator base = (p1->first == end) ? this->prefix().first : (*this)[0].first; + BidiIterator l_end = this->suffix().second; + BidiIterator l_base = (p1->first == l_end) ? this->prefix().first : (*this)[0].first; difference_type len1 = 0; difference_type len2 = 0; difference_type base1 = 0; @@ -326,9 +326,9 @@ void BOOST_REGEX_CALL match_results::maybe_assign(const // compute the length of the whole sequence, as this can be really // expensive). // - if(p1->first == end) + if(p1->first == l_end) { - if(p2->first != end) + if(p2->first != l_end) { // p2 must be better than p1, and no need to calculate // actual distances: @@ -347,13 +347,13 @@ void BOOST_REGEX_CALL match_results::maybe_assign(const continue; } } - else if(p2->first == end) + else if(p2->first == l_end) { // p1 better than p2, and no need to calculate distances: return; } - base1 = ::boost::re_detail::distance(base, p1->first); - base2 = ::boost::re_detail::distance(base, p2->first); + base1 = ::boost::re_detail::distance(l_base, p1->first); + base2 = ::boost::re_detail::distance(l_base, p2->first); BOOST_ASSERT(base1 >= 0); BOOST_ASSERT(base2 >= 0); if(base1 < base2) return; @@ -410,3 +410,4 @@ std::ostream& operator << (std::ostream& os, #endif + diff --git a/include/boost/regex/v4/perl_matcher.hpp b/include/boost/regex/v4/perl_matcher.hpp index 22d887cd..15d284d0 100644 --- a/include/boost/regex/v4/perl_matcher.hpp +++ b/include/boost/regex/v4/perl_matcher.hpp @@ -327,9 +327,9 @@ public: match_results& what, const basic_regex& e, match_flag_type f, - BidiIterator base) + BidiIterator l_base) : m_result(what), base(first), last(end), - position(first), backstop(base), re(e), traits_inst(e.get_traits()), + position(first), backstop(l_base), re(e), traits_inst(e.get_traits()), m_independent(false), next_count(&rep_obj), rep_obj(&next_count) { construct_init(e, f);