--===============1078055912== Content-Type: multipart/signed; boundary="nextPart1531445.GNI7xIGbiz"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1531445.GNI7xIGbiz Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 15 October 2006 07:40, Rafael Fern=C3=A1ndez L=C3=B3pez wrote: > > ( * ) KIconLoader * ldr =3D KGlobal::iconLoader(); > > > > > QPixmap icon =3D ldr->loadIcon(info.icon(), K3Icon::Panel, > > > K3Icon::SizeLarge); > > > > > > can be done in one step: > > > > > > QPixmap icon =3D KGlobal::iconLoader()->loadIcon( info.icon(), > > > K3Icon::Panel, K3Icon::SizeLarge); > > > > this should make no practical difference in running time. putting code = on > > one > > line does not magically make it faster ;) > > Well, not in time to the user, but if we can avoid innecesary assignments > we should, that's clock time to the computer, and the machine needs that > time for assignments (I know, is a pointer, but it is an assignment...) Although it sounds like the issue has been resolved I just wanted to point = out=20 that the reason this isn't an optimization is that in this case if you don'= t=20 write out the intermediate temporary variable, the compiler will still make= =20 it for you. So there is no benefit to be had from this change, not even=20 theoretically. And if you were to use ldr more than once then it would be a net win, becau= se=20 then you wouldn't have to call KGlobal::iconLoader() unnecessarily. Regards, - Michael Pyne --nextPart1531445.GNI7xIGbiz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQBFMs/dqjQYp5Omm0oRAiKMAKDMwiwrNUHdQ1QqSDU7ccQgATMfcACgphEt B93WobStErHEVswlX8lESXc= =i+sF -----END PGP SIGNATURE----- --nextPart1531445.GNI7xIGbiz-- --===============1078055912== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1078055912==--