Misuse of K_GLOBAL_STATIC?
Thiago Macieira
thiago at kde.org
Wed May 14 12:28:48 BST 2008
On Wednesday 14 May 2008 13:21:47 Jarosław Staniek wrote:
> Hi, shouldn't we move K_GLOBAL_STATIC out of the bodies in such cases?
>
>
> KIMProxy * KIMProxy::instance()
> {
> K_GLOBAL_STATIC(KIMProxy, s_instance)
> return s_instance;
> }
Yes, they should be out of function bodies. The use above is not what
K_GLOBAL_STATIC was intended to be. I recommend not doing it even though it
works. Something might change in the future.
--
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: 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/20080514/d6fd8121/attachment.sig>
More information about the kde-core-devel
mailing list