Move wstring to string conversion to StringUtils.cpp and update most HID get serial number functions to use it
This commit is contained in:
parent
366fda30f5
commit
b4d15b9545
159 changed files with 623 additions and 930 deletions
|
|
@ -9,12 +9,11 @@
|
|||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include <codecvt>
|
||||
#include <cstring>
|
||||
#include <locale>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "AMDWraithPrismController.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
AMDWraithPrismController::AMDWraithPrismController(hid_device* dev_handle, const char* path)
|
||||
{
|
||||
|
|
@ -57,9 +56,7 @@ std::string AMDWraithPrismController::GetSerialString()
|
|||
return("");
|
||||
}
|
||||
|
||||
std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
|
||||
|
||||
return(converter.to_bytes(serial_string));
|
||||
return(StringUtils::wstring_to_string(serial_string));
|
||||
}
|
||||
|
||||
std::string AMDWraithPrismController::GetFirmwareVersionString()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue