diff options
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Device.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Device.cpp | 8 |
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); } // |
