forked from boostorg/regex
Suppress gcc -Wshadow warnings.
[SVN r33425]
This commit is contained in:
@ -194,10 +194,10 @@ public:
|
||||
{
|
||||
return static_cast<re_syntax_base*>(static_cast<void*>(static_cast<char*>(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()
|
||||
{
|
||||
|
@ -94,10 +94,10 @@ basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>*
|
||||
}
|
||||
|
||||
template <class charT, class traits>
|
||||
void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2, unsigned flags)
|
||||
void basic_regex_parser<charT, traits>::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<charT, traits>::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<charT, traits>::parse_extended;
|
||||
@ -127,8 +127,8 @@ void basic_regex_parser<charT, traits>::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<charT, traits>::parse_set_literal(basic_char_set<charT,
|
||||
template <class charT, class traits>
|
||||
digraph<charT> basic_regex_parser<charT, traits>::get_next_set_literal(basic_char_set<charT, traits>& char_set)
|
||||
{
|
||||
typedef typename traits::string_type string_type;
|
||||
digraph<charT> result;
|
||||
switch(this->m_traits.syntax_type(*m_position))
|
||||
{
|
||||
|
@ -310,8 +310,8 @@ void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::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<BidiIterator, Allocator>::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<BidiIterator, Allocator>::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
|
||||
|
||||
|
||||
|
@ -327,9 +327,9 @@ public:
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
const basic_regex<char_type, traits>& 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);
|
||||
|
Reference in New Issue
Block a user