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