summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.cpp
diff options
context:
space:
mode:
authorMichael M <mchtly@gmail.com>2017-11-04 13:49:07 -0700
committerMichael M <mchtly@gmail.com>2017-11-19 12:46:39 -0800
commit6b7d5bb80c296f765494f6a11d230a96fa7143d9 (patch)
tree3a497f01356d1d95c12102a81e5a35f234d65699 /Source/Core/InputCommon/ControllerInterface/Device.cpp
parentac855e2c93319622d644a99ab5f2ece012338fff (diff)
DeviceQualifier: small cleanup
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Device.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Device.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Device.cpp b/Source/Core/InputCommon/ControllerInterface/Device.cpp
index 48d40cb9af..3c0add95f2 100644
--- a/Source/Core/InputCommon/ControllerInterface/Device.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/Device.cpp
@@ -87,15 +87,17 @@ std::string DeviceQualifier::ToString() const
//
void DeviceQualifier::FromString(const std::string& str)
{
+ *this = {};
+
std::istringstream ss(str);
- std::getline(ss, source = "", '/');
+ std::getline(ss, source, '/');
// silly
std::getline(ss, name, '/');
- std::istringstream(name) >> (cid = -1);
+ std::istringstream(name) >> cid;
- std::getline(ss, name = "");
+ std::getline(ss, name);
}
//