summaryrefslogtreecommitdiff
path: root/src/hotkeys.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hotkeys.cpp')
-rw-r--r--src/hotkeys.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp
index 9f323bc28..24e6b6c41 100644
--- a/src/hotkeys.cpp
+++ b/src/hotkeys.cpp
@@ -301,7 +301,9 @@ void HotkeyList::Save(IniFile *ini) const
int HotkeyList::CheckMatch(uint16 keycode, bool global_only) const
{
for (const Hotkey *list = this->items; list->name != NULL; ++list) {
- if (list->keycodes.Contains(keycode | WKC_GLOBAL_HOTKEY) || (!global_only && list->keycodes.Contains(keycode))) {
+ auto begin = list->keycodes.begin();
+ auto end = list->keycodes.end();
+ if (std::find(begin, end, keycode | WKC_GLOBAL_HOTKEY) != end || (!global_only && std::find(begin, end, keycode) != end)) {
return list->num;
}
}