singleton::exists() addition for K_GLOBAL_STATIC
David Faure
faure at kde.org
Mon May 5 14:15:56 BST 2008
On Sunday 04 May 2008, Thiago Macieira wrote:
> David Faure wrote:
> >+ bool exists()
> > \ + {
> > \ + return _k_static_##NAME != 0;
> > \ + }
>
> Missing the "inline".
OK. Then it's missing before isDestroyed() too. I'll add it to both.
> I'd go as far now as marking all of those extra methods
> __attribute__((always_inline)) to make sure gcc never generates them if
> they're not used.
Is this really necessary with template classes? I thought this happened automatically.
If not, then it sounds like something for kdemacros.h.cmake (KDE_ALWAYS_INLINE?).
But it does sound like something people will abuse instead of letting the compiler choose :)
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list