Changeset 3832 in orxonox.OLD for orxonox/trunk/src/lib/util
- Timestamp:
- Apr 14, 2005, 1:16:31 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/util/list.h
r3831 r3832 110 110 bool isEmpty(); 111 111 int getSize(); 112 T* enumerate();112 //T* enumerate(); 113 113 tIterator<T>* getIterator(); 114 114 T* nextElement(); … … 170 170 inline void tList<T>::remove(T* entity) 171 171 { 172 //__UNLIKELY( entity == NULL) return;173 172 this->currentEl = this->first; 174 173 listElement<T>* te; 175 174 while( this->currentEl != NULL) 176 175 { 177 if( this->currentEl->curr == entity)176 __UNLIKELY_IF( this->currentEl->curr == entity) 178 177 { 179 if( this->currentEl->prev == NULL ) this->first = this->currentEl->next;178 __UNLIKELY_IF( this->currentEl->prev == NULL ) this->first = this->currentEl->next; 180 179 else this->currentEl->prev->next = this->currentEl->next; 181 180 182 if( this->currentEl->next == NULL) this->last = this->currentEl->prev;181 __UNLIKELY_IF( this->currentEl->next == NULL) this->last = this->currentEl->prev; 183 182 else this->currentEl->next->prev = this->currentEl->prev; 184 183 185 //te = this->currentEl->next; // for what am i doing this?186 184 delete this->currentEl; 187 //this->currentEl = te;188 this->currentEl = NULL;189 185 this->size--; 190 186 return; … … 218 214 } 219 215 216 220 217 template<class T> 221 218 inline T* tList<T>::lastElement() … … 240 237 241 238 /* deprecated */ 239 /* 242 240 template<class T> 243 241 T* tList<T>::enumerate() … … 248 246 return this->currentEl->curr; 249 247 } 250 248 */ 251 249 252 250 template<class T>
Note: See TracChangeset
for help on using the changeset viewer.