aboutsummaryrefslogtreecommitdiff
path: root/common/singleton.h
diff options
context:
space:
mode:
authorThierry Crozat2017-07-03 18:59:12 +0100
committerEugene Sandulenko2017-07-10 21:11:20 +0200
commiteefa72afa1978a9dea10f5b1833fcc8f58a3468e (patch)
tree97ef0c982cad7cc54cf93c0f6a6cec3d072b1a69 /common/singleton.h
parent1141bfc1a603decce8f02a85a1fc76073a646d1a (diff)
downloadscummvm-rg350-eefa72afa1978a9dea10f5b1833fcc8f58a3468e.tar.gz
scummvm-rg350-eefa72afa1978a9dea10f5b1833fcc8f58a3468e.tar.bz2
scummvm-rg350-eefa72afa1978a9dea10f5b1833fcc8f58a3468e.zip
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.
Diffstat (limited to 'common/singleton.h')
-rw-r--r--common/singleton.h9
1 files changed, 1 insertions, 8 deletions
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<T>::_singleton = 0
+template<class T> T *Singleton<T>::_singleton = 0;
} // End of namespace Common