workaround for VC8

This commit is contained in:
David Rose 2006-09-01 20:22:01 +00:00
parent 049dd58cdf
commit 633a4f0d1e

View File

@ -184,7 +184,7 @@ matches_substr(string::const_iterator pi, string::const_iterator pend,
// A special exception: we allow ci to reach the end before pi, // A special exception: we allow ci to reach the end before pi,
// only if pi is one character before the end and that last // only if pi is one character before the end and that last
// character is '*'. // character is '*'.
if ((ci == cend) && (pi + 1 == pend) && (*pi) == '*') { if ((ci == cend) && (std::distance(pi, pend) == 1) && (*pi) == '*') {
return true; return true;
} }
return (pi == pend && ci == cend); return (pi == pend && ci == cend);