Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1140


Ignore:
Timestamp:
Apr 22, 2008, 10:03:26 PM (17 years ago)
Author:
landauf
Message:

dynamic_cast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/InputBuffer.h

    r1066 r1140  
    6363            void registerListener(T* listener, void (T::*function)(), bool bOnlySingleInput)
    6464            {
    65                 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
     65                struct InputBufferListenerTuple newListener = {dynamic_cast<InputBufferListener*>(listener), (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
    6666                this->listeners_.insert(this->listeners_.end(), newListener);
    6767            }
     
    6969            void registerListener(T* listener, void (T::*function)() const, bool bOnlySingleInput)
    7070            {
    71                 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
     71                struct InputBufferListenerTuple newListener = {dynamic_cast<InputBufferListener*>(listener), (void (InputBufferListener::*)())function, true, bOnlySingleInput, ' '};
    7272                this->listeners_.insert(this->listeners_.end(), newListener);
    7373            }
     
    7676            void registerListener(T* listener, void (T::*function)(), char char_, bool bOnlySingleInput)
    7777            {
    78                 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
     78                struct InputBufferListenerTuple newListener = {dynamic_cast<InputBufferListener*>(listener), (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
    7979                this->listeners_.insert(this->listeners_.end(), newListener);
    8080            }
     
    8282            void registerListener(T* listener, void (T::*function)() const, char char_, bool bOnlySingleInput)
    8383            {
    84                 struct InputBufferListenerTuple newListener = {listener, (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
     84                struct InputBufferListenerTuple newListener = {dynamic_cast<InputBufferListener*>(listener), (void (InputBufferListener::*)())function, false, bOnlySingleInput, char_};
    8585                this->listeners_.insert(this->listeners_.end(), newListener);
    8686            }
Note: See TracChangeset for help on using the changeset viewer.