From 6b7d5bb80c296f765494f6a11d230a96fa7143d9 Mon Sep 17 00:00:00 2001 From: Michael M Date: Sat, 4 Nov 2017 13:49:07 -0700 Subject: [PATCH] DeviceQualifier: small cleanup --- Source/Core/InputCommon/ControllerInterface/Device.cpp | 8 +++++--- Source/Core/InputCommon/ControllerInterface/Device.h | 3 --- 2 files changed, 5 insertions(+), 6 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); } // diff --git a/Source/Core/InputCommon/ControllerInterface/Device.h b/Source/Core/InputCommon/ControllerInterface/Device.h index 5482b93ac0..560a842999 100644 --- a/Source/Core/InputCommon/ControllerInterface/Device.h +++ b/Source/Core/InputCommon/ControllerInterface/Device.h @@ -18,9 +18,6 @@ namespace ciface { namespace Core { -// Forward declarations -class DeviceQualifier; - // // Device //