Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5079 in orxonox.OLD


Ignore:
Timestamp:
Aug 19, 2005, 5:10:35 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minor optimisations

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/graphics_engine.cc

    r5078 r5079  
    4646  this->maxFPS = 0;
    4747
     48  this->geTextCFPS = NULL;
     49  this->geTextMaxFPS = NULL;
     50  this->geTextMinFPS = NULL;
     51
    4852  this->fullscreenFlag = 0;
    4953}
     
    6064{
    6165  // delete what has to be deleted here
     66  delete this->geTextCFPS;
     67  delete this->geTextMaxFPS;
     68  delete this->geTextMinFPS;
     69
    6270
    6371  delete Render2D::getInstance();
     
    445453    {
    446454#ifndef NO_TEXT
    447       this->geTextCFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
    448       this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
    449       this->geTextCFPS->setPosition2D(5, 5);
     455if (this->geTextCFPS == NULL)
     456{
     457  this->geTextCFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
     458  this->geTextCFPS->setAlignment(TEXT_ALIGN_LEFT);
     459  this->geTextCFPS->setPosition2D(5, 5);
     460}
     461if (this->geTextMaxFPS == NULL)
     462{
    450463      this->geTextMaxFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
    451464      this->geTextMaxFPS->setAlignment(TEXT_ALIGN_LEFT);
    452465      this->geTextMaxFPS->setPosition2D(5, 35);
     466}
     467if (this->geTextMinFPS == NULL)
     468{
    453469      this->geTextMinFPS = TextEngine::getInstance()->createText("fonts/arial_black.ttf", 15, TEXT_DYNAMIC, 0, 255, 0);
    454470      this->geTextMinFPS->setAlignment(TEXT_ALIGN_LEFT);
    455471      this->geTextMinFPS->setPosition2D(5, 65);
     472}
    456473#endif /* NO_TEXT */
    457474    }
  • trunk/src/util/shell.cc

    r5078 r5079  
    5959{
    6060  // delete what has to be deleted here
     61  tIterator<Text>* textIterator = this->bufferText->getIterator();
     62  Text* textElem = textIterator->nextElement();
     63
     64  while (textElem != NULL)
     65  {
     66    delete textElem;
     67
     68    textElem = textIterator->nextElement();
     69  }
     70  delete textIterator;
     71  delete this->bufferText;
    6172
    6273  Shell::singletonRef = NULL;
  • trunk/src/util/track/track_manager.cc

    r4856 r5079  
    458458  delete this->firstTrackElem;
    459459
     460  delete this->trackText;
    460461  // the tracknode should be deleted here, but is deleted by pNode: -> null_parent
    461462
Note: See TracChangeset for help on using the changeset viewer.