diff options
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r-- | src/input/inputmanager.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index c30d97394..d3f38c7c1 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -27,6 +27,7 @@ #include "input/joystick.h" #include "input/keyboardconfig.h" #include "input/keyboarddata.h" +#include "input/keysortfunctor.h" #include "being/localplayer.h" #ifdef USE_SDL2 #include "input/multitouchmanager.h" @@ -61,17 +62,10 @@ class QuitDialog; extern QuitDialog *quitDialog; -static class KeyFunctor final +namespace { - public: - bool operator() (const int key1, const int key2) const - { - return keys[key1].priority >= keys[key2].priority; - } - - const KeyData *keys; -} keyDataSorter; - + KeySortFunctor keyDataSorter; +} // namespace InputManager::InputManager() : mSetupInput(nullptr), |