diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-08-09 23:39:01 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-09 23:39:01 +1000 |
| commit | 48ca2c6f2e70111cf72052d5d258328c2fdb9afd (patch) | |
| tree | 9d69b41773993fb46b53fea45377b85136b6014c /Source/Core/InputCommon/ControllerInterface/OSX | |
| parent | 0ab7e2eed78731db4b0b2c48f35f85d3a6722272 (diff) | |
| parent | 117a60ceb271594a659392892de2cd1a957bef48 (diff) | |
Merge pull request #8233 from JosJuice/stringutil-string-view
StringUtil: Use std::string_view more
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/OSX')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm | 2 | ||||
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm b/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm index 716a56b61e..37b1fa8cfd 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSX.mm @@ -141,7 +141,7 @@ static std::string GetDeviceRefName(IOHIDDeviceRef inIOHIDDeviceRef) { const NSString* name = reinterpret_cast<const NSString*>( IOHIDDeviceGetProperty(inIOHIDDeviceRef, CFSTR(kIOHIDProductKey))); - return (name != nullptr) ? StripSpaces([name UTF8String]) : "Unknown device"; + return (name != nullptr) ? std::string(StripSpaces([name UTF8String])) : "Unknown device"; } static void DeviceRemovalCallback(void* inContext, IOReturn inResult, void* inSender, diff --git a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm index 9ab06c91db..3b59d5b2ec 100644 --- a/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm +++ b/Source/Core/InputCommon/ControllerInterface/OSX/OSXJoystick.mm @@ -164,7 +164,7 @@ std::string Joystick::Button::GetName() const { std::ostringstream s; s << IOHIDElementGetUsage(m_element); - return std::string("Button ") + StripSpaces(s.str()); + return std::string("Button ").append(StripSpaces(s.str())); } Joystick::Axis::Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction dir) |
