[Patch] Fix undeleted "static QFont *_font" in kglobalsettings.cpp

Thiago Macieira thiago at kde.org
Fri Dec 5 10:31:08 GMT 2008

On Friday 05 December 2008 08:58:18 Johannes Sixt wrote:
> Friedrich W. H. Kossebau schrieb:
> > 1. How to set an array of pointers all to 0 most efficiently (mFonts)?
> #include <algorithm>
> std::fill_n(mFonts, FontCount, (QFont*)0);
> or
> std::fill_n<QFont**,int,QFont*>(mFonts, FontCount, 0);

Proper C++ way of doing it, but less efficient than a simple memset :-)

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Software Engineer - Nokia, Qt Software
  Qt Software is hiring - ask me
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081205/4610db4b/attachment.sig>

More information about the kde-core-devel mailing list