From e8bf3c35dc0b0948a911c1cdb7caa4e1d578eb66 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Thu, 8 Aug 2024 20:40:12 -0500 Subject: [PATCH] Fix type issues in QMK controllers --- .../RGBController_QMKOpenRGBRev9.cpp | 12 ++++++------ .../RGBController_QMKOpenRGBRev9.h | 4 ++-- .../RGBController_QMKOpenRGBRevB.cpp | 12 ++++++------ .../RGBController_QMKOpenRGBRevB.h | 4 ++-- .../RGBController_QMKOpenRGBRevD.cpp | 12 ++++++------ .../RGBController_QMKOpenRGBRevD.h | 4 ++-- .../RGBController_QMKOpenRGBRevE.cpp | 12 ++++++------ .../RGBController_QMKOpenRGBRevE.h | 4 ++-- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.cpp b/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.cpp index a6c70175..3cdb1d9a 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.cpp +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.cpp @@ -571,8 +571,8 @@ void RGBController_QMKOpenRGBRev9::PlaceLEDsInMaps VectorMatrix& underglow_map_xl ) { - matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); - underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); + matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); + underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); unsigned int x = 0; unsigned int y = 0; @@ -612,14 +612,14 @@ void RGBController_QMKOpenRGBRev9::PlaceLEDsInMaps VectorMatrix RGBController_QMKOpenRGBRev9::MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ) { std::vector > matrix_map(height); - for (unsigned int i = 0; i < height; i++) + for(std::size_t i = 0; i < height; i++) { - for (unsigned int j = 0; j < width; j++) + for(std::size_t j = 0; j < width; j++) { matrix_map[i].push_back(NO_LED); } diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.h b/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.h index f3c08a2e..d3ae0d87 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.h +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRev9Controller/RGBController_QMKOpenRGBRev9.h @@ -80,8 +80,8 @@ private: VectorMatrix MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ); void CleanMatrixMaps diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.cpp b/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.cpp index 02dd02b1..8c9f086b 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.cpp +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.cpp @@ -612,8 +612,8 @@ void RGBController_QMKOpenRGBRevB::PlaceLEDsInMaps VectorMatrix& underglow_map_xl ) { - matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); - underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); + matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); + underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); unsigned int x = 0; unsigned int y = 0; @@ -653,14 +653,14 @@ void RGBController_QMKOpenRGBRevB::PlaceLEDsInMaps VectorMatrix RGBController_QMKOpenRGBRevB::MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ) { std::vector > matrix_map(height); - for (unsigned int i = 0; i < height; i++) + for(std::size_t i = 0; i < height; i++) { - for (unsigned int j = 0; j < width; j++) + for(std::size_t j = 0; j < width; j++) { matrix_map[i].push_back(NO_LED); } diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.h b/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.h index 008b839e..10424d90 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.h +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRevBController/RGBController_QMKOpenRGBRevB.h @@ -82,8 +82,8 @@ private: VectorMatrix MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ); void CleanMatrixMaps diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.cpp b/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.cpp index 68ff6058..48b89c50 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.cpp +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.cpp @@ -613,8 +613,8 @@ void RGBController_QMKOpenRGBRevD::PlaceLEDsInMaps VectorMatrix& underglow_map_xl ) { - matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); - underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); + matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); + underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); unsigned int x = 0; unsigned int y = 0; @@ -654,14 +654,14 @@ void RGBController_QMKOpenRGBRevD::PlaceLEDsInMaps VectorMatrix RGBController_QMKOpenRGBRevD::MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ) { std::vector > matrix_map(height); - for (unsigned int i = 0; i < height; i++) + for(std::size_t i = 0; i < height; i++) { - for (unsigned int j = 0; j < width; j++) + for(std::size_t j = 0; j < width; j++) { matrix_map[i].push_back(NO_LED); } diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.h b/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.h index ae14c9d7..62f323d5 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.h +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRevDController/RGBController_QMKOpenRGBRevD.h @@ -81,8 +81,8 @@ private: VectorMatrix MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ); void CleanMatrixMaps diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.cpp b/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.cpp index 1e796479..c9daea92 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.cpp +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.cpp @@ -629,8 +629,8 @@ void RGBController_QMKOpenRGBRevE::PlaceLEDsInMaps VectorMatrix& underglow_map_xl ) { - matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); - underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), std::round(255/divisor) + 10); + matrix_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); + underglow_map_xl = MakeEmptyMatrixMap(unique_rows.size(), (std::size_t)(std::round(255 / divisor) + 10)); unsigned int x = 0; unsigned int y = 0; @@ -670,14 +670,14 @@ void RGBController_QMKOpenRGBRevE::PlaceLEDsInMaps VectorMatrix RGBController_QMKOpenRGBRevE::MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ) { std::vector > matrix_map(height); - for (unsigned int i = 0; i < height; i++) + for(std::size_t i = 0; i < height; i++) { - for (unsigned int j = 0; j < width; j++) + for(std::size_t j = 0; j < width; j++) { matrix_map[i].push_back(NO_LED); } diff --git a/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.h b/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.h index f2809e34..1ced8853 100644 --- a/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.h +++ b/Controllers/QMKOpenRGBController/QMKOpenRGBRevEController/RGBController_QMKOpenRGBRevE.h @@ -82,8 +82,8 @@ private: VectorMatrix MakeEmptyMatrixMap ( - unsigned int height, - unsigned int width + std::size_t height, + std::size_t width ); void CleanMatrixMaps