Fix wstring to string conversion warning in MSIMysticLight64Controller.cpp

This commit is contained in:
Adam Honse 2024-08-07 21:45:49 -05:00
parent 5ebd95b72a
commit e84a9b5327

View file

@ -70,10 +70,9 @@ std::string MSIMysticLight64Controller::GetDeviceName()
hid_get_manufacturer_string(dev, tname, 256);
/*-----------------------------------------------------*\
| Convert wchar_t into std::wstring into std::string |
| Convert to std::string |
\*-----------------------------------------------------*/
std::wstring wname = std::wstring(tname);
std::string name = std::string(wname.begin(), wname.end());
std::string name = StringUtils::wstring_to_string(tname);
/*-----------------------------------------------------*\
| Get the product string from HID |
@ -83,9 +82,9 @@ std::string MSIMysticLight64Controller::GetDeviceName()
/*-----------------------------------------------------*\
| Append the product string to the manufacturer string |
\*-----------------------------------------------------*/
wname = std::wstring(tname);
name.append(" ").append(std::string(wname.begin(), wname.end()));
return name;
name.append(" ").append(StringUtils::wstring_to_string(tname));
return(name);
}
std::string MSIMysticLight64Controller::GetFWVersion()