Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5131 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Aug 26, 2005, 11:18:24 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: modified the tList-template again.

prais patrick who's holy omnipotence was such that i could never reach

Location:
trunk/src/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/collision_detection/cd_engine.cc

    r5116 r5131  
    100100        ////////////////
    101101
    102 /*        if( likely(entity2 != this->terrain))
     102        if( likely(entity2 != this->terrain))
    103103        {
    104104          PRINTF(4)("checking object %s against %s\n", entity1->getName(), entity2->getName());
    105105          tree = entity1->getOBBTree();
    106106          if( likely(tree != NULL) && entity2->getOBBTree() != NULL) tree->collideWith(entity1, entity2);
    107         }*/
     107        }
    108108        entity2 = iterator2->nextElement();
    109109      }
  • trunk/src/lib/util/list.h

    r5120 r5131  
    382382    inline T* tIterator<T>::firstElement ()
    383383{
    384   this->currentEl = this->list->first;
    385   if (this->currentEl != NULL)
    386     return this->currentEl->curr;
     384  this->tmpEl = this->list->first;
     385  if (this->tmpEl != NULL)
     386  {
     387    this->currentEl = this->tmpEl->next;
     388    return this->tmpEl->curr;
     389  }
    387390  else
    388391    return NULL;
     
    392395    inline T* tIterator<T>::lastElement ()
    393396{
    394   this->currentEl = this->list->last;
    395   if (this->currentEl != NULL)
    396     return this->currentEl->curr;
     397  this->tmpEl = this->list->last;
     398  if (this->tmpEl != NULL)
     399  {
     400    this->currentEl = tmpEl->prev;
     401    return this->tmpEl->curr;
     402  }
    397403  else
    398404    return NULL;
     
    410416    return NULL;
    411417
     418  this->tmpEl = this->currentEl;
    412419  this->currentEl = this->currentEl->next;
    413   if (this->currentEl != NULL)
    414     return this->currentEl->curr;
    415   else
    416     return NULL;
     420
     421  return this->tmpEl->curr;
    417422}
    418423
     
    427432    return NULL;
    428433
     434  this->tmpEl = this->currentEl;
    429435  this->currentEl = this->currentEl->prev;
    430   if (this->currentEl != NULL)
    431     return this->currentEl->curr;
    432   else
    433     return NULL;
     436
     437  return this->tmpEl->curr;
    434438}
    435439
Note: See TracChangeset for help on using the changeset viewer.