summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-18 18:40:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-18 18:40:59 +0300
commit31cce4c22b369148f77d7092903af9462d8151c8 (patch)
treebd11e598db5ff6e17d3f0b283c44e333ac37d696 /src/input
parente6afa441a57718205c1f62bcbc0a5443fd513aa3 (diff)
downloadmanaverse-31cce4c22b369148f77d7092903af9462d8151c8.tar.gz
manaverse-31cce4c22b369148f77d7092903af9462d8151c8.tar.bz2
manaverse-31cce4c22b369148f77d7092903af9462d8151c8.tar.xz
manaverse-31cce4c22b369148f77d7092903af9462d8151c8.zip
Fix code style.
Diffstat (limited to 'src/input')
-rw-r--r--src/input/inputactiondata.h6
-rw-r--r--src/input/inputactionmap.h6
-rw-r--r--src/input/inputmanager.cpp11
3 files changed, 14 insertions, 9 deletions
diff --git a/src/input/inputactiondata.h b/src/input/inputactiondata.h
index 95c55e689..403f5050e 100644
--- a/src/input/inputactiondata.h
+++ b/src/input/inputactiondata.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef INPUT_KEYDATA_H
-#define INPUT_KEYDATA_H
+#ifndef INPUT_INPUTACTIONDATA_H
+#define INPUT_INPUTACTIONDATA_H
#include "events/inputevent.h"
@@ -59,4 +59,4 @@ namespace Input
} // namespace Input
-#endif // INPUT_KEYDATA_H
+#endif // INPUT_INPUTACTIONDATA_H
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 538ba8675..cb1278d08 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -20,8 +20,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef INPUT_KEYBOARDDATA_H
-#define INPUT_KEYBOARDDATA_H
+#ifndef INPUT_INPUTACTIONMAP_H
+#define INPUT_INPUTACTIONMAP_H
#include "actionmanager.h"
#include "sdlshared.h"
@@ -2221,4 +2221,4 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
| InputCondition::VALIDSPEED}
};
-#endif // INPUT_KEYBOARDDATA_H
+#endif // INPUT_INPUTACTIONMAP_H
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 68950f4cf..22ea7f85b 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -107,7 +107,8 @@ void InputManager::retrieve()
for (int i = 0; i < InputAction::TOTAL; i++)
{
#ifdef USE_SDL2
- const std::string cf = std::string("sdl2") + inputActionData[i].configField;
+ const std::string cf = std::string("sdl2")
+ + inputActionData[i].configField;
#else
const std::string cf = inputActionData[i].configField;
#endif
@@ -162,7 +163,8 @@ void InputManager::store() const
for (int i = 0; i < InputAction::TOTAL; i++)
{
#ifdef USE_SDL2
- const std::string cf = std::string("sdl2") + inputActionData[i].configField;
+ const std::string cf = std::string("sdl2")
+ + inputActionData[i].configField;
#else
const std::string cf = inputActionData[i].configField;
#endif
@@ -276,8 +278,11 @@ bool InputManager::hasConflicts(int &restrict key1, int &restrict key2) const
size_t j;
for (j = i, j++; j < InputAction::TOTAL; j++)
{
- if ((kdi.grp & inputActionData[j].grp) == 0 || !*kdi.configField)
+ if ((kdi.grp & inputActionData[j].grp) == 0
+ || !*kdi.configField)
+ {
continue;
+ }
for (size_t j2 = 0; j2 < inputFunctionSize; j2 ++)
{