Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 19, 2009, 12:27:53 PM (15 years ago)
Author:
rgrieder
Message:

Optimisations in the pathway of the input. Nobody will ever notice the difference in performance (immeasurable), but I love the beauty of having all my template code inlined when it even decreases code size (because the code gets inlined exactly once).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/input/InputState.h

    r3292 r3310  
    174174    };
    175175
    176     inline void InputState::update(float dt)
     176    FORCEINLINE void InputState::update(float dt)
    177177    {
    178178        for (unsigned int i = 0; i < handlers_.size(); ++i)
     
    181181    }
    182182
    183     inline void InputState::update(float dt, unsigned int device)
     183    FORCEINLINE void InputState::update(float dt, unsigned int device)
    184184    {
    185185        switch (device)
     
    203203
    204204    template <typename EventType, class Traits>
    205     inline void InputState::buttonEvent(unsigned int device, const typename Traits::ButtonTypeParam button)
     205    FORCEINLINE void InputState::buttonEvent(unsigned int device, const typename Traits::ButtonTypeParam button)
    206206    {
    207207        assert(device < handlers_.size());
     
    210210    }
    211211
    212     inline void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
     212    FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
    213213    {
    214214        if (handlers_[mouseIndex_s] != NULL)
     
    216216    }
    217217
    218     inline void InputState::mouseScrolled(int abs, int rel)
     218    FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
    219219    {
    220220        if (handlers_[mouseIndex_s] != NULL)
     
    222222    }
    223223
    224     inline void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
     224    FORCEINLINE void InputState::joyStickAxisMoved(unsigned int device, unsigned int axis, float value)
    225225    {
    226226        assert(device < handlers_.size());
Note: See TracChangeset for help on using the changeset viewer.