From eefa72afa1978a9dea10f5b1833fcc8f58a3468e Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Mon, 3 Jul 2017 18:59:12 +0100 Subject: COMMON: Change way the Singleton instances are instantiated This fixes tons of warnings with clang from a recent xcode version on macOS (and possibly other systems) complaining that an instantiation of _singleton is required but no definition is available. --- common/singleton.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'common/singleton.h') diff --git a/common/singleton.h b/common/singleton.h index 9bcd590183..6c36d7a37d 100644 --- a/common/singleton.h +++ b/common/singleton.h @@ -88,14 +88,7 @@ protected: static T *_singleton; }; -/** - * Note that you need to use this macro from the Common namespace. - * - * This is because C++ requires initial explicit specialization - * to be placed in the same namespace as the template. - */ -#define DECLARE_SINGLETON(T) \ - template<> T *Singleton::_singleton = 0 +template T *Singleton::_singleton = 0; } // End of namespace Common -- cgit v1.2.3