Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2513


Ignore:
Timestamp:
Dec 18, 2008, 11:28:50 AM (15 years ago)
Author:
rgrieder
Message:

Fixed a bug in Timer.h: Include of Executor was missing, but when using forward declarations, you can still cast to base classes if you use a brute force C-style cast.
In this case this would not have mattered (simple derivation), but C-style casts with pointers are dangerous.

Location:
code/branches/presentation/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/core/Iterator.h

    r2506 r2513  
    9696            inline Iterator(ObjectListElement<O>* element)
    9797            {
    98                 this->element_ = (element) ? static_cast<ObjectListBaseElement*<(element) : 0;
     98                this->element_ = (element) ? static_cast<ObjectListBaseElement*>(element) : 0;
    9999                this->list_ = ClassIdentifier<O>::getIdentifier()->getObjects();
    100100                this->iterator_ = this->list_->registerIterator(this);
  • code/branches/presentation/src/orxonox/tools/Timer.h

    r2506 r2513  
    6262
    6363#include "OrxonoxPrereqs.h"
     64#include "core/Executor.h"
    6465#include "core/OrxonoxClass.h"
    6566#include "gamestates/GSRoot.h"
     
    198199                this->setInterval(interval);
    199200                this->bLoop_ = bLoop;
    200                 this->executor_ = static_cast<Executor*>(executor);
     201                this->executor_ = executor;
    201202                this->bActive_ = true;
    202203
Note: See TracChangeset for help on using the changeset viewer.