summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-01-25 07:19:21 +0100
committerLioncash <mathew1800@gmail.com>2016-01-25 07:19:21 +0100
commit3933b68c5977a581e63ce1a29352fba3f7c2a97e (patch)
treec92dc90cb3b13fed9e0809d2cf188af0c946d162 /src
parentMerge pull request #1334 from tfarley/hw-depth-modifiers (diff)
downloadyuzu-3933b68c5977a581e63ce1a29352fba3f7c2a97e.tar
yuzu-3933b68c5977a581e63ce1a29352fba3f7c2a97e.tar.gz
yuzu-3933b68c5977a581e63ce1a29352fba3f7c2a97e.tar.bz2
yuzu-3933b68c5977a581e63ce1a29352fba3f7c2a97e.tar.lz
yuzu-3933b68c5977a581e63ce1a29352fba3f7c2a97e.tar.xz
yuzu-3933b68c5977a581e63ce1a29352fba3f7c2a97e.tar.zst
yuzu-3933b68c5977a581e63ce1a29352fba3f7c2a97e.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/key_map.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/key_map.h b/src/common/key_map.h
index 0ecec714f..68f7e2f99 100644
--- a/src/common/key_map.h
+++ b/src/common/key_map.h
@@ -4,6 +4,7 @@
#pragma once
+#include <tuple>
#include "core/hle/service/hid/hid.h"
namespace KeyMap {
@@ -15,15 +16,14 @@ struct HostDeviceKey {
int key_code;
int device_id; ///< Uniquely identifies a host device
- bool operator < (const HostDeviceKey &other) const {
- if (device_id == other.device_id) {
- return key_code < other.key_code;
- }
- return device_id < other.device_id;
+ bool operator<(const HostDeviceKey &other) const {
+ return std::tie(key_code, device_id) <
+ std::tie(other.key_code, other.device_id);
}
- bool operator == (const HostDeviceKey &other) const {
- return device_id == other.device_id && key_code == other.key_code;
+ bool operator==(const HostDeviceKey &other) const {
+ return std::tie(key_code, device_id) ==
+ std::tie(other.key_code, other.device_id);
}
};