From b55357c4bffafa629453abdfd6bb411d89ec5f25 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 17 Jul 2014 22:17:32 +0300 Subject: Rename KeySortFunctor into InputActionSortFunctor. --- src/input/inputactionsortfunctor.h | 39 ++++++++++++++++++++++++++++++++++++++ src/input/inputmanager.cpp | 4 ++-- src/input/keysortfunctor.h | 39 -------------------------------------- 3 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 src/input/inputactionsortfunctor.h delete mode 100644 src/input/keysortfunctor.h (limited to 'src/input') diff --git a/src/input/inputactionsortfunctor.h b/src/input/inputactionsortfunctor.h new file mode 100644 index 000000000..1e79cc27e --- /dev/null +++ b/src/input/inputactionsortfunctor.h @@ -0,0 +1,39 @@ +/* + * The ManaPlus Client + * Copyright (C) 2012-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef INPUT_INPUTACTIONSORTFUNCTOR_H +#define INPUT_INPUTACTIONSORTFUNCTOR_H + +#include "input/inputactiondata.h" + +#include "localconsts.h" + +class InputActionSortFunctor final +{ + public: + bool operator() (const int key1, const int key2) const + { + return keys[key1].priority >= keys[key2].priority; + } + + const InputActionData *keys; +}; + +#endif // INPUT_INPUTACTIONSORTFUNCTOR_H diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index 429297cfd..68950f4cf 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -25,9 +25,9 @@ #include "touchmanager.h" #include "input/inputactionmap.h" +#include "input/inputactionsortfunctor.h" #include "input/joystick.h" #include "input/keyboardconfig.h" -#include "input/keysortfunctor.h" #include "being/localplayer.h" #ifdef USE_SDL2 #include "input/multitouchmanager.h" @@ -64,7 +64,7 @@ extern QuitDialog *quitDialog; namespace { - KeySortFunctor inputActionDataSorter; + InputActionSortFunctor inputActionDataSorter; } // namespace InputManager::InputManager() : diff --git a/src/input/keysortfunctor.h b/src/input/keysortfunctor.h deleted file mode 100644 index fedb4c395..000000000 --- a/src/input/keysortfunctor.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2012-2014 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef INPUT_KEYSORTFUNCTOR_H -#define INPUT_KEYSORTFUNCTOR_H - -#include "input/inputactiondata.h" - -#include "localconsts.h" - -class KeySortFunctor final -{ - public: - bool operator() (const int key1, const int key2) const - { - return keys[key1].priority >= keys[key2].priority; - } - - const InputActionData *keys; -}; - -#endif // INPUT_KEYSORTFUNCTOR_H -- cgit v1.2.3-70-g09d2