diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-22 22:05:12 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-22 22:05:12 +0200 |
commit | 8797569d33c4917eb8f8a1dc2341aac7b5815315 (patch) | |
tree | 839aca030b0d3ed36cef15b051fbfd4bf8ecb754 /src/common/singleton.h | |
parent | 86ea086790a677d6de6a836e7562814d3ba30bd1 (diff) | |
download | colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.tar.gz colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.tar.bz2 colobot-8797569d33c4917eb8f8a1dc2341aac7b5815315.zip |
Texture & mouse functions; refactoring & fixes
- cleaned up and added documentation to engine.h
- refactored CEngine interface and associated structs
- added mouse handling functions in CApplication & CEngine
- fixed bugs in projection matrix setting
- changed texture loading & handling
- added const-values in CDevice & CGLDevice
- changed event management in CApplication
- other minor changes & bugfixes
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); } |