Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3832 in orxonox.OLD for orxonox/trunk/src/lib/util


Ignore:
Timestamp:
Apr 14, 2005, 1:16:31 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: animation class functions implemented, list enhanced

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/util/list.h

    r3831 r3832  
    110110  bool isEmpty();
    111111  int getSize();
    112   T* enumerate();
     112  //T* enumerate();
    113113  tIterator<T>* getIterator();
    114114  T* nextElement();
     
    170170inline void tList<T>::remove(T* entity)
    171171{
    172   //__UNLIKELY( entity == NULL) return;
    173172  this->currentEl = this->first;
    174173  listElement<T>* te;
    175174  while( this->currentEl != NULL)
    176175    {
    177       if( this->currentEl->curr == entity)
     176      __UNLIKELY_IF( this->currentEl->curr == entity)
    178177        {
    179           if( this->currentEl->prev  == NULL ) this->first = this->currentEl->next;
     178          __UNLIKELY_IF( this->currentEl->prev  == NULL ) this->first = this->currentEl->next;
    180179          else this->currentEl->prev->next = this->currentEl->next;
    181180
    182           if( this->currentEl->next == NULL) this->last = this->currentEl->prev;
     181          __UNLIKELY_IF( this->currentEl->next == NULL) this->last = this->currentEl->prev;
    183182          else this->currentEl->next->prev = this->currentEl->prev;
    184183
    185           //te = this->currentEl->next;  // for what am i doing this?
    186184          delete this->currentEl;
    187           //this->currentEl = te;
    188           this->currentEl = NULL;
    189185          this->size--;
    190186          return;
     
    218214}
    219215
     216
    220217template<class T>
    221218inline T* tList<T>::lastElement()
     
    240237
    241238/* deprecated */
     239/*
    242240template<class T>
    243241T* tList<T>::enumerate()
     
    248246  return this->currentEl->curr;
    249247}
    250 
     248*/
    251249
    252250template<class T>
Note: See TracChangeset for help on using the changeset viewer.