Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 2, 2015, 11:22:03 PM (9 years ago)
Author:
landauf
Message:

use actual types instead of 'auto'. only exception is for complicated template types, e.g. when iterating over a map

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/input/InputDevice.h

    r10845 r10916  
    158158
    159159            // Call all the states with the held button event
    160             for (auto & button : pressedButtons_)
    161                 for (auto & state : inputStates_)
     160            for (ButtonType& button : pressedButtons_)
     161                for (InputState* state : inputStates_)
    162162                    state->template buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
    163163                        this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
    164164
    165165            // Call states with device update events
    166             for (auto & elem : inputStates_)
    167                 elem->update(time.getDeltaTime(), this->getDeviceID());
     166            for (InputState* state : inputStates_)
     167                state->update(time.getDeltaTime(), this->getDeviceID());
    168168
    169169            static_cast<DeviceClass*>(this)->updateImpl(time);
     
    196196
    197197            // Call states
    198             for (auto & elem : inputStates_)
    199                 elem->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
     198            for (InputState* state : inputStates_)
     199                state->template buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
    200200        }
    201201
     
    218218
    219219            // Call states
    220             for (auto & elem : inputStates_)
    221                 elem->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
     220            for (InputState* state : inputStates_)
     221                state->template buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
    222222        }
    223223
Note: See TracChangeset for help on using the changeset viewer.