Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2009, 10:48:47 PM (15 years ago)
Author:
landauf
Message:

Realized Timer doesn't have to be a template, hence merged TimerBase, Timer and StaticTimer.
Removed the object pointer from Timer for memberfunctions, use createFunctor(f, object) instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/pong/PongAI.cc

    r5800 r5831  
    6060    PongAI::~PongAI()
    6161    {
    62         for (std::list<std::pair<Timer<PongAI>*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
     62        for (std::list<std::pair<Timer*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
    6363            (*it).first->destroy();
    6464    }
     
    231231
    232232            // Add a new Timer
    233             Timer<PongAI>* timer = new Timer<PongAI>(delay, false, this, createExecutor(createFunctor(&PongAI::delayedMove)));
    234             this->reactionTimers_.push_back(std::pair<Timer<PongAI>*, char>(timer, direction));
     233            Timer* timer = new Timer(delay, false, createExecutor(createFunctor(&PongAI::delayedMove, this)));
     234            this->reactionTimers_.push_back(std::pair<Timer*, char>(timer, direction));
    235235        }
    236236        else
     
    246246
    247247        // Destroy the timer and remove it from the list
    248         Timer<PongAI>* timer = this->reactionTimers_.front().first;
     248        Timer* timer = this->reactionTimers_.front().first;
    249249        timer->destroy();
    250250
Note: See TracChangeset for help on using the changeset viewer.