Fix wstring to string conversion warning in MSIMysticLight64Controller.cpp
This commit is contained in:
parent
5ebd95b72a
commit
e84a9b5327
1 changed files with 5 additions and 6 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue