Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5115 in orxonox.OLD for trunk/src/lib/physics/physics_engine.cc


Ignore:
Timestamp:
Aug 24, 2005, 1:30:13 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: reimplemented the list functions, as i did before in revision 5110.
This time, i looked out for the bugs, and i think i found one

@patrick: i know, that you do not want to code at the moment… :/ → see mail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/physics/physics_engine.cc

    r5111 r5115  
    5353  // delete all PhysicsConnections that are still in existence
    5454  tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
    55   PhysicsConnection* enumPC = itPC->nextElement();
     55  PhysicsConnection* enumPC = itPC->firstElement();
    5656  while (enumPC)
    5757  {
     
    6060  }
    6161  delete itPC;
    62   delete this->connections;
    63 
    64   // delete all PhysicsInterfaces, still in existence (this could be dangerous)
    65   tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
    66   PhysicsInterface* enumPI = itPI->nextElement();
    67   while (enumPI)
    68   {
    69     delete enumPI;
    70 
    71     enumPI = itPI->nextElement();
    72   }
    73   delete itPI;
    74   delete this->interfaces;
    75 
    76   // delete all PhysicsFields, still in existence (this could be dangerous)
    77   tIterator<Field>* itF = this->fields->getIterator();
    78   Field* enumF = itF->nextElement();
    79   while (enumF)
    80   {
    81     delete enumF;
    82 
    83     enumF = itF->nextElement();
    84   }
    85   delete itF;
    86   delete this->fields;
     62   delete this->connections;
     63//
     64//   // delete all PhysicsInterfaces, still in existence (this could be dangerous)
     65//   tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
     66//   PhysicsInterface* enumPI = itPI->firstElement();
     67//   while (enumPI)
     68//   {
     69//     delete enumPI;
     70//
     71//     enumPI = itPI->nextElement();
     72//   }
     73//   delete itPI;
     74//   delete this->interfaces;
     75//
     76//   // delete all PhysicsFields, still in existence (this could be dangerous)
     77//   tIterator<Field>* itF = this->fields->getIterator();
     78//   Field* enumF = itF->firstElement();
     79//   while (enumF)
     80//   {
     81//     delete enumF;
     82//
     83//     enumF = itF->nextElement();
     84//   }
     85//   delete itF;
     86   delete this->fields;
    8787
    8888
     
    163163{
    164164  tIterator<PhysicsInterface>* tmpIt = interfaces->getIterator();
    165   PhysicsInterface* tmpInt = tmpIt->nextElement();
     165  PhysicsInterface* tmpInt = tmpIt->firstElement();
    166166  while(tmpInt)
    167167  {
     
    206206{
    207207  tIterator<Field>* tmpIt = fields->getIterator();
    208   Field* tmpField = tmpIt->nextElement();
     208  Field* tmpField = tmpIt->firstElement();
    209209  while(tmpField)
    210210  {
     
    251251{
    252252  tIterator<PhysicsConnection>* tmpIt = connections->getIterator();
    253   PhysicsConnection* tmpConn = tmpIt->nextElement();
     253  PhysicsConnection* tmpConn = tmpIt->firstElement();
    254254  while(tmpConn)
    255255  {
     
    278278  meaning let the fields work */
    279279  tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
    280   PhysicsConnection* enumPC = itPC->nextElement();
     280  PhysicsConnection* enumPC = itPC->firstElement();
    281281  while (enumPC)
    282282    {
     
    289289  /* actually tick all the PhysicsInterfaces. Move the objects around */
    290290  tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
    291   PhysicsInterface* enumPI = itPI->nextElement();
     291  PhysicsInterface* enumPI = itPI->firstElement();
    292292  while (enumPI)
    293293    {
Note: See TracChangeset for help on using the changeset viewer.