Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6610 in orxonox.OLD


Ignore:
Timestamp:
Jan 19, 2006, 12:29:58 AM (18 years ago)
Author:
bensch
Message:

trunk: minor valgrinds

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/environments/water.cc

    r6523 r6610  
    9090    delete[] this->velocities;
    9191  }
    92   if (this->grid != NULL)
    93     delete this->grid;
     92
     93//   WE DO NOT NEED THIS AS IT IS DONE IN WORLDENTITY->setModel();
     94//   if (this->grid != NULL)
     95//     this->grid = NULL;
     96
    9497  this->grid = new Grid(this->sizeX, this->sizeY, this->resX, this->resY);
    9598  this->velocities = new float*[this->resX];
    9699  for (unsigned int i = 0; i < this->grid->rows(); i++)
     100  {
    97101    this->velocities[i] = new float[this->resY];
    98 
     102    for (unsigned int j = 0; j < this->resY; j++)
     103      this->velocities[i][j] = 0.0;
     104  }
    99105  this->setModel(this->grid, 0);
    100106}
Note: See TracChangeset for help on using the changeset viewer.