summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-10-29 02:02:04 +0300
committerAndrei Karas <akaras@inbox.ru>2018-10-29 02:02:04 +0300
commita6d18b282ab916c6536dc25516affeb9200043b6 (patch)
tree9980735a47cb2118999fb4f4dceaa52bf9f4fae7 /src/input
parent98c74738f21d7ae256f1273b6c1614ee64e2a3ad (diff)
downloadManaVerse-a6d18b282ab916c6536dc25516affeb9200043b6.tar.gz
ManaVerse-a6d18b282ab916c6536dc25516affeb9200043b6.tar.bz2
ManaVerse-a6d18b282ab916c6536dc25516affeb9200043b6.tar.xz
ManaVerse-a6d18b282ab916c6536dc25516affeb9200043b6.zip
Fix code style.s20181102
Diffstat (limited to 'src/input')
-rw-r--r--src/input/joystick.cpp2
-rw-r--r--src/input/keyboardconfig.cpp8
-rw-r--r--src/input/keyboardconfig.h2
-rw-r--r--src/input/keyinput.h4
-rw-r--r--src/input/mouseinput.h6
5 files changed, 11 insertions, 11 deletions
diff --git a/src/input/joystick.cpp b/src/input/joystick.cpp
index e5bf1c220..91e21dc1c 100644
--- a/src/input/joystick.cpp
+++ b/src/input/joystick.cpp
@@ -263,7 +263,7 @@ void Joystick::logic()
logger->log("axis 4 pos: %d", SDL_JoystickGetAxis(mJoystick, 4));
#endif // DEBUG_JOYSTICK
- if ((mDirection == 0u) && mHaveHats)
+ if ((mDirection == 0U) && mHaveHats)
{
// reading only hat 0
const uint8_t hat = SDL_JoystickGetHat(mJoystick, 0);
diff --git a/src/input/keyboardconfig.cpp b/src/input/keyboardconfig.cpp
index f201d6811..daef2e32f 100644
--- a/src/input/keyboardconfig.cpp
+++ b/src/input/keyboardconfig.cpp
@@ -182,12 +182,12 @@ bool KeyboardConfig::isActionActive(const InputActionT index) const
const int value = val.value;
if (value >= 0)
{
- if (mActiveKeys[value] != 0u)
+ if (mActiveKeys[value] != 0U)
return true;
}
else if (value < -1 && value > -500)
{
- if (mActiveKeys2[-value] != 0u)
+ if (mActiveKeys2[-value] != 0U)
return true;
}
}
@@ -247,12 +247,12 @@ void KeyboardConfig::handleRepeat(const int time)
const int key = (*it).first;
if (key >= 0)
{
- if ((mActiveKeys != nullptr) && (mActiveKeys[key] != 0u))
+ if ((mActiveKeys != nullptr) && (mActiveKeys[key] != 0U))
repeat = true;
}
else if (key < -1 && key > -500)
{
- if ((mActiveKeys2 != nullptr) && (mActiveKeys2[-key] != 0u))
+ if ((mActiveKeys2 != nullptr) && (mActiveKeys2[-key] != 0U))
repeat = true;
}
if (repeat)
diff --git a/src/input/keyboardconfig.h b/src/input/keyboardconfig.h
index 0e7f6fac4..cfef188fb 100644
--- a/src/input/keyboardconfig.h
+++ b/src/input/keyboardconfig.h
@@ -96,7 +96,7 @@ class KeyboardConfig final
return event.key.keysym.scancode;
#else // USE_SDL2
- if (event.key.keysym.sym != 0u)
+ if (event.key.keysym.sym != 0U)
return CAST_S32(event.key.keysym.sym);
else if (event.key.keysym.scancode > 1)
return -event.key.keysym.scancode;
diff --git a/src/input/keyinput.h b/src/input/keyinput.h
index 5a8a26363..4d38cfe4d 100644
--- a/src/input/keyinput.h
+++ b/src/input/keyinput.h
@@ -79,7 +79,7 @@
class KeyInput final
{
public:
- KeyInput() :
+ KeyInput() noexcept2 :
mKey(0),
mType(KeyEventType::PRESSED),
#ifdef USE_SDL2
@@ -88,7 +88,7 @@ class KeyInput final
mActionId(InputAction::UNDEFINED_VALUE)
{ }
- KeyInput(const KeyInput &k) :
+ KeyInput(const KeyInput &k) noexcept2 :
mKey(k.mKey),
mType(k.mType),
#ifdef USE_SDL2
diff --git a/src/input/mouseinput.h b/src/input/mouseinput.h
index 59d74196d..4a683ca66 100644
--- a/src/input/mouseinput.h
+++ b/src/input/mouseinput.h
@@ -72,7 +72,7 @@
class MouseInput final
{
public:
- MouseInput() :
+ MouseInput() noexcept2 :
mType(MouseEventType::MOVED),
mButton(MouseButton::EMPTY),
mTimeStamp(0),
@@ -82,7 +82,7 @@ class MouseInput final
mRealY(0)
{ }
- MouseInput(const MouseInput &m) :
+ MouseInput(const MouseInput &m) noexcept2 :
mType(m.mType),
mButton(m.mButton),
mTimeStamp(m.mTimeStamp),
@@ -95,7 +95,7 @@ class MouseInput final
A_DEFAULT_COPY(MouseInput)
- MouseInput &operator=(const MouseInput &m)
+ MouseInput &operator=(const MouseInput &m) noexcept2
{
mType = m.mType;
mButton = m.mButton;