diff options
Diffstat (limited to 'src/common/singleton.h')
-rw-r--r-- | src/common/singleton.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/singleton.h b/src/common/singleton.h index ee01b24..4df7878 100644 --- a/src/common/singleton.h +++ b/src/common/singleton.h @@ -29,21 +29,21 @@ template<typename T> class CSingleton public: static T& GetInstance() { - aserrt(mInstance); + assert(mInstance != NULL); return *mInstance; } - static T& GetInstancePointer() { - aserrt(mInstance); + static T* GetInstancePointer() { + assert(mInstance != NULL); return mInstance; } static bool IsCreated() { - return mInstance != NULL; + return mInstance != NULL; } CSingleton() { - assert(!mInstance); + assert(mInstance == NULL); mInstance = static_cast<T *>(this); } |