Changeset 3586 in orxonox.OLD for orxonox/trunk/src/lib/util
- Timestamp:
- Mar 17, 2005, 2:15:33 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/util/list.h
r3585 r3586 120 120 void tList<T>::add(T* entity) 121 121 { 122 if( entity == NULL) return; 122 123 listElement* el = new listElement; 123 124 el->prev = this->last; … … 136 137 void tList<T>::remove(T* entity) 137 138 { 139 if( entity == NULL) return; 138 140 this->currentEl = this->first; 139 141 listElement* te; … … 200 202 T* tList<T>::enumerate() 201 203 { 202 if(this->last == this->first) return NULL; 204 //if( this->last == this->first == NULL) return NULL; 205 if(this->size == 0) return NULL; 203 206 this->currentEl = this->first; 204 207 return this->currentEl->curr; … … 209 212 T* tList<T>::nextElement() 210 213 { 211 if(this->last == this->first) return NULL; 214 // if( this->last == this->first == NULL) return NULL; 215 if(this->size == 0) return NULL; 212 216 this->currentEl = this->currentEl->next; 213 217 if(this->currentEl == NULL) return NULL; … … 222 226 T* tList<T>::nextElement(T* toEntity) 223 227 { 224 if( this->last == this->first) return NULL; 228 //if( this->last == this->first == NULL) return NULL; 229 if(this->size == 0) return NULL; 225 230 if( toEntity == NULL) return this->first->curr; 226 231 if( toEntity == this->last->curr ) return this->first->curr;
Note: See TracChangeset
for help on using the changeset viewer.