Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3831 in orxonox.OLD for orxonox/trunk/src/lib


Ignore:
Timestamp:
Apr 14, 2005, 2:54:02 AM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: implemente animation sine function

File:
1 edited

Legend:

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

    r3790 r3831  
    7878
    7979template<class T>
    80 tIterator<T>::~tIterator ()
     80inline tIterator<T>::~tIterator ()
    8181{
    8282  this->currentEl = NULL;
     
    126126
    127127template<class T>
    128 tList<T>::tList ()
     128inline tList<T>::tList ()
    129129{
    130130  this->first = NULL;
     
    134134
    135135template<class T>
    136 tList<T>::~tList ()
     136inline tList<T>::~tList ()
    137137{
    138138  this->currentEl = this->first;
     
    153153inline void tList<T>::add(T* entity)
    154154{
    155   if( entity == NULL) return;
     155  __UNLIKELY_IF( entity == NULL) return;
    156156  listElement<T>* el = new listElement<T>;
    157157  el->prev = this->last;
     
    161161  this->last = el;
    162162
    163   if(el->prev == NULL) this->first = el; /* if first element */
     163  __UNLIKELY_IF(el->prev == NULL) this->first = el; /* if first element */
    164164  else el->prev->next = el;
    165165  this->size++;
     
    170170inline void tList<T>::remove(T* entity)
    171171{
    172   if( entity == NULL) return;
     172  //__UNLIKELY( entity == NULL) return;
    173173  this->currentEl = this->first;
    174174  listElement<T>* te;
     
    196196
    197197template<class T>
    198 void tList<T>::destroy()
     198inline void tList<T>::destroy()
    199199{
    200200  this->currentEl = this->first;
     
    213213
    214214template<class T>
    215 T* tList<T>::firstElement()
     215inline T* tList<T>::firstElement()
    216216{
    217217  return this->first->curr;
     
    219219
    220220template<class T>
    221 T* tList<T>::lastElement()
     221inline T* tList<T>::lastElement()
    222222{
    223223  return this->last->curr;
     
    226226
    227227template<class T>
    228 bool tList<T>::isEmpty()
     228inline bool tList<T>::isEmpty()
    229229{
    230230  return (this->size==0)?true:false;
     
    233233
    234234template<class T>
    235 int tList<T>::getSize()
     235inline int tList<T>::getSize()
    236236{
    237237  return this->size;
     
    239239
    240240
     241/* deprecated */
    241242template<class T>
    242243T* tList<T>::enumerate()
     
    257258
    258259
     260/* deprecated */
    259261template<class T>
    260262T* tList<T>::nextElement()
     
    272274*/
    273275template<class T>
    274 T* tList<T>::nextElement(T* toEntity)
     276inline T* tList<T>::nextElement(T* toEntity)
    275277{
    276278  //if( this->last == this->first == NULL) return NULL;
Note: See TracChangeset for help on using the changeset viewer.