Skip to content

Commit 22d908b

Browse files
Fix warnings in ClevoLightbarController.cpp
1 parent 13d3e09 commit 22d908b

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Controllers/ClevoLightbarController/ClevoLightbarController.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
| SPDX-License-Identifier: GPL-2.0-or-later |
1111
\*---------------------------------------------------------*/
1212

13-
#include "ClevoLightbarController.h"
1413
#include <cstring>
14+
#include "ClevoLightbarController.h"
15+
#include "StringUtils.h"
1516

1617
ClevoLightbarController::ClevoLightbarController(hid_device* dev_handle, const hid_device_info& info)
1718
{
@@ -40,10 +41,7 @@ std::string ClevoLightbarController::GetSerialString()
4041
return("");
4142
}
4243

43-
std::wstring return_wstring = serial_string;
44-
std::string return_string(return_wstring.begin(), return_wstring.end());
45-
46-
return(return_string);
44+
return(StringUtils::wstring_to_string(serial_string));
4745
}
4846

4947
std::string ClevoLightbarController::GetFirmwareVersion()

0 commit comments

Comments
 (0)