mirror of https://github.com/Icinga/icinga2.git
Windows build fix.
This commit is contained in:
parent
27e1d311de
commit
8d52535fad
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue