[tested PATCH] let QString::lower() assume lower case input to avoid real_detach()

Roger Larsson kde-optimize@mail.kde.org
Fri, 24 Jan 2003 21:13:57 +0100


On Friday 24 January 2003 19:42, Harri Porten wrote:
> On Fri, 24 Jan 2003, Harri Porten wrote:
>=20
> > >  If it's tested patch, you could probably send it to=20
qt-bugs@trolltech.com :).
> >=20
> > No need to. I will fix* and improve it a bit and check it into qt-copy =
for
> > everyone to tes^H^H^Henjoy :)
>=20
> I found an elegant solution done by a colleague to be present in the main
> (e.g. HEAD) branch already. Just applied my change that removes the imo
> redundant if(p) check:
>=20

I reread your comment regarding the if(p) check.
It is not redundant! If the characters are different then 'l' will be !=3D 0
But if the loop has terminated 'l' will be 0 - but the compiler should
notice these two situations and do the right thing with no need for
adding an extra test. Note that if the first condition is false it wont
evaluate the second.

/RogerL

=2D-=20
Roger Larsson
Skellefte=E5
Sweden