diff --git a/Controllers/MintakaKeyboardController/MintakaKeyboardController.cpp b/Controllers/MintakaKeyboardController/MintakaKeyboardController.cpp index 88626a4f..cf35cd1c 100644 --- a/Controllers/MintakaKeyboardController/MintakaKeyboardController.cpp +++ b/Controllers/MintakaKeyboardController/MintakaKeyboardController.cpp @@ -9,8 +9,10 @@ | This file is part of the OpenRGB project | | SPDX-License-Identifier: GPL-2.0-only | \*---------------------------------------------------------*/ -#include "MintakaKeyboardController.h" + #include +#include "MintakaKeyboardController.h" +#include "StringUtils.h" using namespace std::chrono_literals; @@ -29,8 +31,7 @@ MintakaKeyboardController::MintakaKeyboardController(hid_device* dev_handle, con } else { - std::wstring return_wstring = serial_string; - serial_number = std::string(return_wstring.begin(), return_wstring.end()); + serial_number = StringUtils::wstring_to_string(serial_string); } } diff --git a/Controllers/MintakaKeyboardController/RGBController_MintakaKeyboard.cpp b/Controllers/MintakaKeyboardController/RGBController_MintakaKeyboard.cpp index 82950cf6..63ef6a65 100644 --- a/Controllers/MintakaKeyboardController/RGBController_MintakaKeyboard.cpp +++ b/Controllers/MintakaKeyboardController/RGBController_MintakaKeyboard.cpp @@ -277,12 +277,12 @@ void RGBController_MintakaKeyboard::SetupZones() | Create LEDs for the Matrix zone | | Place keys in the layout to populate the matrix | \*---------------------------------------------------------*/ - for(size_t led_idx = 0; led_idx < new_zone.leds_count; led_idx++) + for(unsigned int led_idx = 0; led_idx < new_zone.leds_count; led_idx++) { led new_led; - new_led.name = new_kb.GetKeyNameAt(led_idx); - new_led.value = new_kb.GetKeyValueAt(led_idx); + new_led.name = new_kb.GetKeyNameAt(led_idx); + new_led.value = new_kb.GetKeyValueAt(led_idx); leds.push_back(new_led); }