Fix wstring to string conversion warning in MSIMysticLight185Controller.cpp
This commit is contained in:
parent
e7d10a8582
commit
5ebd95b72a
1 changed files with 3 additions and 5 deletions
|
|
@ -1053,10 +1053,9 @@ void MSIMysticLight185Controller::ReadName()
|
|||
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);
|
||||
name = std::string(wname.begin(), wname.end());
|
||||
name = StringUtils::wstring_to_string(tname);
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Get the product string from HID |
|
||||
|
|
@ -1066,8 +1065,7 @@ void MSIMysticLight185Controller::ReadName()
|
|||
/*-----------------------------------------------------*\
|
||||
| Append the product string to the manufacturer string |
|
||||
\*-----------------------------------------------------*/
|
||||
wname = std::wstring(tname);
|
||||
name.append(" ").append(std::string(wname.begin(), wname.end()));
|
||||
name.append(" ").append(StringUtils::wstring_to_string(tname));
|
||||
}
|
||||
|
||||
MSI_MODE MSIMysticLight185Controller::GetMode()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue