Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7948 in orxonox.OLD for branches/cr/src/lib/collision_reaction


Ignore:
Timestamp:
May 29, 2006, 1:35:35 AM (18 years ago)
Author:
patrick
Message:

cr: cr cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cr/src/lib/collision_reaction/cr_engine.cc

    r7947 r7948  
    5050{
    5151  CREngine::singletonRef = NULL;
     52
     53  if( this->cachedCollisions.size() != CR_MAX_COLLISIONS)
     54    PRINTF(0)("CollisionReaction Error: cache size missmatch: %i of %i\n", this->cachedCollisions.size(), CR_NUMBER);
     55
     56  this->reset();
     57
     58  while( !this->cachedCollisions.empty())
     59    delete this->cachedCollisions.front();
     60  this->cachedCollisions.clear();
    5261}
    5362
     
    7079{
    7180  // first clear all CollisionHandles
    72   std::vector<CollisionHandle*>::iterator it;
    73   for( it = this->collisionHandles.begin(); it != this->collisionHandles.end(); it++)
     81
     82  while( !this->collisionHandles.empty())
    7483  {
    75     (*it)->reset();
    76     delete *it;
     84    this->collisionHandles.front()->reset();
     85    delete this->collisionHandles.front();
    7786  }
    7887  this->collisionHandles.clear();
Note: See TracChangeset for help on using the changeset viewer.