24 Apr
2008
24 Apr
'08
15:27
Hi, On Thu, 24 Apr 2008, Josef Reidinger wrote:
So I implement it (code of it in test file which I attach). Speed improve is really significant.
Well, nice, but it doesn't do what it's supposed to. You probably want to check some results manually. In particular:
while (string::npos != (loc = sData.find(sFrom, loc))) { sNew.append(sData,oldLoc,loc);
The third argument to append is a length, not an offset.
sNew.append(sTo); loc += toLen; oldLoc = loc; if (loc >= sNew.length()) break;
Get rid of this if and break. It's meanwhile wrong I think. Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org