mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-04 22:24:12 -04:00
Move wstring to string conversion to StringUtils.cpp and update most HID get serial number functions to use it
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user