/[pcre]/code/trunk/pcrecpp.cc
ViewVC logotype

Diff of /code/trunk/pcrecpp.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 296 by ph10, Wed Dec 19 12:21:45 2007 UTC revision 297 by ph10, Fri Jan 4 19:44:00 2008 UTC
# Line 369  int RE::GlobalReplace(const StringPiece& Line 369  int RE::GlobalReplace(const StringPiece&
369    int start = 0;    int start = 0;
370    int lastend = -1;    int lastend = -1;
371    
372    for (; start <= static_cast<int>(str->length()); count++) {    while (start <= static_cast<int>(str->length())) {
373      int matches = TryMatch(*str, start, UNANCHORED, vec, kVecSize);      int matches = TryMatch(*str, start, UNANCHORED, vec, kVecSize);
374      if (matches <= 0)      if (matches <= 0)
375        break;        break;
# Line 409  int RE::GlobalReplace(const StringPiece& Line 409  int RE::GlobalReplace(const StringPiece&
409        Rewrite(&out, rewrite, *str, vec, matches);        Rewrite(&out, rewrite, *str, vec, matches);
410        start = matchend;        start = matchend;
411        lastend = matchend;        lastend = matchend;
412        // count++;  // Removed by PH 19-Dec-2007: duplicate count increment        count++;
413      }      }
414    }    }
415    

Legend:
Removed from v.296  
changed lines
  Added in v.297

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12