Skip to content

Commit a3479f5

Browse files
authored
Merge branch 'CalcProgrammer1:master' into master
2 parents 2baab11 + dbbf985 commit a3479f5

File tree

39 files changed

+1001
-769
lines changed

39 files changed

+1001
-769
lines changed

Controllers/AsusMonitorController/AsusMonitorController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void AsusMonitorController::SetDirect(std::vector<RGBColor> colors)
8989
usb_buf[0x00] = 0xEC;
9090
usb_buf[0x01] = 0x40;
9191
usb_buf[0x02] = 0x84;
92-
usb_buf[0x04] = colors.size();
92+
usb_buf[0x04] = (uint8_t)colors.size();
9393

9494
for(size_t i = 0; i < colors.size(); i++)
9595
{

Controllers/ClevoKeyboardController/ClevoKeyboardController.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 "ClevoKeyboardController.h"
1413
#include <cstring>
14+
#include "ClevoKeyboardController.h"
15+
#include "StringUtils.h"
1516

1617
ClevoKeyboardController::ClevoKeyboardController(hid_device* dev_handle, const hid_device_info& info)
1718
{
@@ -40,10 +41,7 @@ std::string ClevoKeyboardController::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 ClevoKeyboardController::GetFirmwareVersion()

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)