StringUtil: Use std::string_view more

This commit is contained in:
JosJuice
2019-07-08 13:35:53 +02:00
parent 29ba53f6c3
commit a2a1e04fc9
13 changed files with 92 additions and 83 deletions

View File

@ -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,