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 //