Changeset 6536 for code/trunk/src/libraries/util
- Timestamp:
- Mar 16, 2010, 11:22:36 AM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/gamestate (added) merged: 6430-6432,6437,6439-6440
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/util/Singleton.h
r6417 r6536 51 51 static T& getInstance() 52 52 { 53 assert(T::singletonPtr_s != 0);53 assert(T::singletonPtr_s != NULL); 54 54 return *T::singletonPtr_s; 55 } 56 57 //! Tells whether the singleton has been created 58 static bool exists() 59 { 60 return (T::singletonPtr_s != NULL); 55 61 } 56 62 … … 68 74 Singleton() 69 75 { 70 assert(T::singletonPtr_s == 0);76 assert(T::singletonPtr_s == NULL); 71 77 T::singletonPtr_s = static_cast<T*>(this); 72 78 } … … 75 81 ~Singleton() 76 82 { 77 assert(T::singletonPtr_s != 0);78 T::singletonPtr_s = 0;83 assert(T::singletonPtr_s != NULL); 84 T::singletonPtr_s = NULL; 79 85 } 80 86
Note: See TracChangeset
for help on using the changeset viewer.