aboutsummaryrefslogtreecommitdiff
path: root/common/singleton.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/singleton.h')
-rw-r--r--common/singleton.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/common/singleton.h b/common/singleton.h
index 2f721a65f7..c5aa35f68d 100644
--- a/common/singleton.h
+++ b/common/singleton.h
@@ -39,8 +39,6 @@ private:
Singleton<T>(const Singleton<T> &);
Singleton<T> &operator=(const Singleton<T> &);
- static T *_singleton;
-
/**
* The default object factory used by the template class Singleton.
* By specialising this template function, one can make a singleton use a
@@ -89,6 +87,8 @@ protected:
#endif
typedef T SingletonBaseType;
+
+ static T *_singleton;
};
/**
@@ -100,9 +100,7 @@ protected:
* namespace Common is referenced.
*/
#define DECLARE_SINGLETON(T) \
- namespace Common { \
- template<> T *Singleton<T>::_singleton = 0; \
- } // End of namespace Common
+ template<> T *Common::Singleton<T>::_singleton = 0
} // End of namespace Common