Changeset 10398 for code/branches/core7
- Timestamp:
- Apr 26, 2015, 1:34:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/util/Singleton.h
r8858 r10398 112 112 #include "UtilPrereqs.h" 113 113 114 #include <cassert>115 114 #include <cstring> 115 #include <typeinfo> 116 117 #include "OrxAssert.h" 116 118 117 119 namespace orxonox … … 134 136 static T& getInstance() 135 137 { 136 assert(T::singletonPtr_s != NULL);138 OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name()); 137 139 return *T::singletonPtr_s; 138 140 } … … 157 159 Singleton() 158 160 { 159 assert(T::singletonPtr_s == NULL);161 OrxVerify(T::singletonPtr_s == NULL, "T=" << typeid(T).name()); 160 162 T::singletonPtr_s = static_cast<T*>(this); 161 163 } … … 164 166 virtual ~Singleton() 165 167 { 166 assert(T::singletonPtr_s != NULL);168 OrxVerify(T::singletonPtr_s != NULL, "T=" << typeid(T).name()); 167 169 T::singletonPtr_s = NULL; 168 170 }
Note: See TracChangeset
for help on using the changeset viewer.