From 44c7b9fc0780bbb494bccc29a555c5b0e2f59b65 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Tue, 1 Sep 2026 11:31:28 -0500 Subject: [PATCH] Fix warnings in RGBController_HIDLampArray.cpp --- .../RGBController_HIDLampArray.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Controllers/HIDLampArrayController/RGBController_HIDLampArray.cpp b/Controllers/HIDLampArrayController/RGBController_HIDLampArray.cpp index 0898c81a7..2d5a15ff0 100644 --- a/Controllers/HIDLampArrayController/RGBController_HIDLampArray.cpp +++ b/Controllers/HIDLampArrayController/RGBController_HIDLampArray.cpp @@ -336,8 +336,8 @@ void RGBController_HIDLampArray::SetupZones() columns.insert(controller->GetLamps()[lamp_idx].PositionXInMicrometers); } - new_zone.matrix_map.height = rows.size(); - new_zone.matrix_map.width = columns.size(); + new_zone.matrix_map.height = (unsigned int)rows.size(); + new_zone.matrix_map.width = (unsigned int)columns.size(); new_zone.matrix_map.map.resize(rows.size() * columns.size()); memset(new_zone.matrix_map.map.data(), 0xFF, (new_zone.matrix_map.map.size() * sizeof(unsigned int))); @@ -348,7 +348,7 @@ void RGBController_HIDLampArray::SetupZones() size_t idx = std::distance(columns.begin(), columns.find(controller->GetLamps()[lamp_idx].PositionXInMicrometers)); size_t idy = std::distance(rows.begin(), rows.find(controller->GetLamps()[lamp_idx].PositionYInMicrometers)); - new_zone.matrix_map.map[idx + idy * new_zone.matrix_map.width] = lamp_idx; + new_zone.matrix_map.map[idx + idy * new_zone.matrix_map.width] = (unsigned int)lamp_idx; } zones.push_back(new_zone); @@ -373,7 +373,7 @@ void RGBController_HIDLampArray::SetupZones() void RGBController_HIDLampArray::DeviceUpdateLEDs() { - unsigned int leds_to_go = leds.size(); + unsigned int leds_to_go = (unsigned int)leds.size(); while(leds_to_go > 0) { @@ -389,7 +389,7 @@ void RGBController_HIDLampArray::DeviceUpdateLEDs() for(unsigned int led_frame_idx = 0; led_frame_idx < leds_this_frame; led_frame_idx++) { - unsigned short led_idx = (leds.size() - leds_to_go) + led_frame_idx; + unsigned short led_idx = (unsigned short)((leds.size() - leds_to_go) + led_frame_idx); LampIds[led_frame_idx] = led_idx; UpdateColors[led_frame_idx].RedChannel = RGBGetRValue(colors[led_idx]); UpdateColors[led_frame_idx].GreenChannel = RGBGetGValue(colors[led_idx]);