Added minor bug fixes (some expressions starting with ^ were not being found), plus a few warning suppressions.

[SVN r18679]
This commit is contained in:
John Maddock
2003-06-05 10:46:03 +00:00
parent ca984697f0
commit e016ef8e21
2 changed files with 3 additions and 2 deletions

View File

@ -103,7 +103,7 @@ public:
{ {
sub += 2; sub += 2;
string_type result; string_type result;
if(sub < m_subs.size() && (sub > 0)) if(sub < (int)m_subs.size() && (sub > 0))
{ {
const sub_match<RandomAccessIterator>& s = m_subs[sub]; const sub_match<RandomAccessIterator>& s = m_subs[sub];
if(s.matched) if(s.matched)

View File

@ -104,6 +104,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match()
position = base; position = base;
search_base = base; search_base = base;
state_count = 0; state_count = 0;
m_match_flags |= regex_constants::match_all;
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last); m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last);
m_presult->set_base(base); m_presult->set_base(base);
if(m_match_flags & match_posix) if(m_match_flags & match_posix)
@ -691,7 +692,7 @@ bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_lin
} }
if(position == last) if(position == last)
return false; return false;
++position; //++position;
} }
return false; return false;
} }