Changeset 3367 for code/branches/resource
- Timestamp:
- Jul 29, 2009, 11:47:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/resource/src/util/Singleton.h
r3366 r3367 31 31 32 32 #include "UtilPrereqs.h" 33 #include <cassert> 33 34 34 35 namespace orxonox … … 50 51 static T& getInstance() 51 52 { 52 assert(T::singletonPtr_s != NULL);53 assert(T::singletonPtr_s != 0); 53 54 return *T::singletonPtr_s; 54 55 } … … 58 59 Singleton() 59 60 { 60 assert(T::singletonPtr_s == NULL);61 assert(T::singletonPtr_s == 0); 61 62 T::singletonPtr_s = static_cast<T*>(this); 62 63 } … … 65 66 ~Singleton() 66 67 { 67 assert(T::singletonPtr_s != NULL);68 T::singletonPtr_s = NULL;68 assert(T::singletonPtr_s != 0); 69 T::singletonPtr_s = 0; 69 70 } 70 71
Note: See TracChangeset
for help on using the changeset viewer.