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;
|
static boost::mutex mutex;
|
||||||
boost::mutex::scoped_lock lock(mutex);
|
boost::mutex::scoped_lock lock(mutex);
|
||||||
|
|
||||||
if (!m_Instance)
|
static T *instance = NULL;
|
||||||
m_Instance = new T();
|
|
||||||
|
|
||||||
return m_Instance;
|
if (!instance)
|
||||||
|
instance = new T();
|
||||||
|
|
||||||
|
return instance;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
friend T *T::GetInstance(void);
|
friend T *T::GetInstance(void);
|
||||||
|
|
||||||
static T *m_Instance;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
T *Singleton<T>::m_Instance = NULL;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SINGLETON_H */
|
#endif /* SINGLETON_H */
|
||||||
|
|
Loading…
Reference in New Issue