Windows build fix.

This commit is contained in:
Gunnar Beutner 2013-03-15 13:39:53 +01:00
parent 27e1d311de
commit 8d52535fad
1 changed files with 5 additions and 8 deletions

View File

@ -38,20 +38,17 @@ public:
static boost::mutex mutex;
boost::mutex::scoped_lock lock(mutex);
if (!m_Instance)
m_Instance = new T();
static T *instance = NULL;
return m_Instance;
if (!instance)
instance = new T();
return instance;
}
private:
friend T *T::GetInstance(void);
static T *m_Instance;
};
template<typename T>
T *Singleton<T>::m_Instance = NULL;
}
#endif /* SINGLETON_H */