diff options
Diffstat (limited to 'dxr3singleton.h')
-rw-r--r-- | dxr3singleton.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/dxr3singleton.h b/dxr3singleton.h index 8be1216..3639c93 100644 --- a/dxr3singleton.h +++ b/dxr3singleton.h @@ -21,32 +21,32 @@ #ifndef _DXR3_SINGLETON_H_ #define _DXR3_SINGLETON_H_ - + // ================================== -//! A singleton template. +//! A singleton template. /*! - Is a nice solution to use only - one instance of a class. + Is a nice solution to use only + one instance of a class. */ template<typename T> class Singleton { - protected: - Singleton() {} - virtual ~Singleton() {} +protected: + Singleton() {} + virtual ~Singleton() {} - public: - static T& Instance() - { - static T m_Instance; - return m_Instance; - } +public: + static T& Instance() + { + static T m_Instance; + return m_Instance; + } - static T* InstanceP() - { - static T* m_InstanceP = new T; - return m_InstanceP; - } + static T* InstanceP() + { + static T* m_InstanceP = new T; + return m_InstanceP; + } }; #endif /*_DXR3_SINGLETON_H_*/ |