summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2016-06-26 06:40:14 +0200
committerGitHub <noreply@github.com>2016-06-26 06:40:14 +0200
commitbc354277ca9602827ca9ce409e2b74829ec7e635 (patch)
tree190e920c0a74cdd62615b08a125caf0bcf1f342b /Source/Core/InputCommon/ControllerInterface
parent3d72fe3173d4f500d3025766c0578eb26d588c9f (diff)
parent55916b963db191579f4b5ad2fc7fed4ac6fee98e (diff)
Merge pull request #3940 from lioncash/tie
Device: Use std::tie for operator==
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Device.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Device.cpp b/Source/Core/InputCommon/ControllerInterface/Device.cpp
index e47b04de99..ddd7af075a 100644
--- a/Source/Core/InputCommon/ControllerInterface/Device.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Device.cpp
@@ -4,6 +4,7 @@
#include <sstream>
#include <string>
+#include <tuple>
// For InputGateOn()
// This is a really bad layering violation, but it's the cleanest
@@ -136,12 +137,7 @@ bool DeviceQualifier::operator==(const Device* const dev) const
bool DeviceQualifier::operator==(const DeviceQualifier& devq) const
{
- if (cid == devq.cid)
- if (name == devq.name)
- if (source == devq.source)
- return true;
-
- return false;
+ return std::tie(cid, name, source) == std::tie(devq.cid, devq.name, devq.source);
}
std::shared_ptr<Device> DeviceContainer::FindDevice(const DeviceQualifier& devq) const