Can Q_GLOBAL_STATIC replace KStaticDelete ?

Thiago Macieira thiago at kde.org
Mon Jan 22 23:29:24 GMT 2007


Thiago Macieira wrote:
>>+static bool _k_static_##NAME##_destroyed = false;
>
>Don't initialise the variable. This saves us 4 bytes in the executable.

Forget what I said above. The compiler is smart enough to know that 
initialising to 0 is the same as placing on the .bss. So, by all means, 
initialise it.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070123/37412e32/attachment.sig>


More information about the kde-core-devel mailing list