Changeset 3831 in orxonox.OLD for orxonox/trunk/src/lib
- Timestamp:
- Apr 14, 2005, 2:54:02 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/util/list.h
r3790 r3831 78 78 79 79 template<class T> 80 tIterator<T>::~tIterator ()80 inline tIterator<T>::~tIterator () 81 81 { 82 82 this->currentEl = NULL; … … 126 126 127 127 template<class T> 128 tList<T>::tList ()128 inline tList<T>::tList () 129 129 { 130 130 this->first = NULL; … … 134 134 135 135 template<class T> 136 tList<T>::~tList ()136 inline tList<T>::~tList () 137 137 { 138 138 this->currentEl = this->first; … … 153 153 inline void tList<T>::add(T* entity) 154 154 { 155 if( entity == NULL) return;155 __UNLIKELY_IF( entity == NULL) return; 156 156 listElement<T>* el = new listElement<T>; 157 157 el->prev = this->last; … … 161 161 this->last = el; 162 162 163 if(el->prev == NULL) this->first = el; /* if first element */163 __UNLIKELY_IF(el->prev == NULL) this->first = el; /* if first element */ 164 164 else el->prev->next = el; 165 165 this->size++; … … 170 170 inline void tList<T>::remove(T* entity) 171 171 { 172 if( entity == NULL) return;172 //__UNLIKELY( entity == NULL) return; 173 173 this->currentEl = this->first; 174 174 listElement<T>* te; … … 196 196 197 197 template<class T> 198 void tList<T>::destroy()198 inline void tList<T>::destroy() 199 199 { 200 200 this->currentEl = this->first; … … 213 213 214 214 template<class T> 215 T* tList<T>::firstElement()215 inline T* tList<T>::firstElement() 216 216 { 217 217 return this->first->curr; … … 219 219 220 220 template<class T> 221 T* tList<T>::lastElement()221 inline T* tList<T>::lastElement() 222 222 { 223 223 return this->last->curr; … … 226 226 227 227 template<class T> 228 bool tList<T>::isEmpty()228 inline bool tList<T>::isEmpty() 229 229 { 230 230 return (this->size==0)?true:false; … … 233 233 234 234 template<class T> 235 in t tList<T>::getSize()235 inline int tList<T>::getSize() 236 236 { 237 237 return this->size; … … 239 239 240 240 241 /* deprecated */ 241 242 template<class T> 242 243 T* tList<T>::enumerate() … … 257 258 258 259 260 /* deprecated */ 259 261 template<class T> 260 262 T* tList<T>::nextElement() … … 272 274 */ 273 275 template<class T> 274 T* tList<T>::nextElement(T* toEntity)276 inline T* tList<T>::nextElement(T* toEntity) 275 277 { 276 278 //if( this->last == this->first == NULL) return NULL;
Note: See TracChangeset
for help on using the changeset viewer.