diff options
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/joystick.cpp | 2 | ||||
-rw-r--r-- | src/input/keyboardconfig.cpp | 8 | ||||
-rw-r--r-- | src/input/keyboardconfig.h | 2 | ||||
-rw-r--r-- | src/input/keyinput.h | 4 | ||||
-rw-r--r-- | src/input/mouseinput.h | 6 |
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; |