summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-07-24 03:26:01 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-07-24 03:26:01 +0200
commite3bc507ed3b2d89738429bd6ade1a127abf11781 (patch)
treecd6f3d6a7afb06c4334b71dbab78252463d1bf31 /logic
parent9729af15e9138493e435b8db46e89180f5bfb5c2 (diff)
logic/shortcuts: fix signed vs unsigned comparison
Diffstat (limited to 'logic')
-rw-r--r--logic/win32-shortcuts.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/logic/win32-shortcuts.cpp b/logic/win32-shortcuts.cpp
index 15e87877..8e53df83 100644
--- a/logic/win32-shortcuts.cpp
+++ b/logic/win32-shortcuts.cpp
@@ -168,10 +168,9 @@ bool win_key::from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers& mods)
const unsigned our_mods = unsigned(qt & Qt::KeyboardModifierMask);
{
- const auto key_ = qt;
- for (auto& wk : windows_key_sequences)
+ for (const win_key& wk : windows_key_sequences)
{
- if (wk.qt == key_)
+ if (unsigned(wk.qt) == qt)
{
dik = wk.win;
mods = Qt::NoModifier;
@@ -181,9 +180,9 @@ bool win_key::from_qt(QKeySequence qt_, int& dik, Qt::KeyboardModifiers& mods)
}
{
const unsigned key = qt & ~Qt::KeyboardModifierMask;
- for (auto& wk : windows_key_sequences)
+ for (const win_key& wk : windows_key_sequences)
{
- if (wk.qt == key)
+ if (unsigned(wk.qt) == key)
{
dik = wk.win;
mods = static_cast<Qt::KeyboardModifiers>(our_mods);