Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7164 in orxonox.OLD for trunk/src/lib/event


Ignore:
Timestamp:
Feb 18, 2006, 5:32:35 PM (19 years ago)
Author:
bensch
Message:

deleted unused stuff

Location:
trunk/src/lib/event
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/event/event_handler.cc

    r6990 r7164  
    2626#include "class_list.h"
    2727
    28 #include "t_stack.h"
    29 
    3028using namespace std;
    3129
     
    5149  this->state = ES_GAME;
    5250  this->keyMapper = NULL;
    53   this->stateStack = NULL;
    5451  this->eventsGrabbed = false;
    5552}
     
    7875    }
    7976  }
    80   delete this->stateStack;
    8177  delete this->keyMapper;
    8278
     
    9995    this->keyMapper->loadKeyBindings(iniParser);
    10096  }
    101   if (this->stateStack == NULL)
    102     this->stateStack = new tStack<short>;
    10397}
    10498
     
    109103void EventHandler::pushState(elState state)
    110104{
    111   if (likely(state != ES_NULL && state != ES_ALL && this->stateStack != NULL))
    112   {
    113     this->stateStack->push(this->state);
     105  if (likely(state != ES_NULL && state != ES_ALL ))
     106  {
     107    this->stateStack.push(this->state);
    114108    this->setState(state);
    115109  }
     
    126120elState EventHandler::popState()
    127121{
    128   if (unlikely(this->stateStack == NULL))
    129     return ES_NULL;
    130   elState state = (elState)this->stateStack->pop();
     122  elState state =  (elState)stateStack.top();
     123  this->stateStack.pop();
    131124  if (state == ES_NULL)
    132125  {
  • trunk/src/lib/event/event_handler.h

    r6054 r7164  
    1111#include "key_mapper.h"
    1212#include "event_def.h"
     13#include <stack>
    1314
    1415// FORWARD DECLARATION
    1516class EventListener;
    16 template<class T> class tStack;
    1717class IniParser;
    1818
     
    5959  EventListener*             listeners[ES_NUMBER][EV_NUMBER]; //!< a list of registered listeners.
    6060  elState                    state;                           //!< the state of the event handlder.
    61   tStack<short>*             stateStack;                      //!< a stack for the States we are in.
     61  std::stack<short>          stateStack;                      //!< a stack for the States we are in.
    6262  KeyMapper*                 keyMapper;                       //!< reference to the key mapper.
    6363
Note: See TracChangeset for help on using the changeset viewer.