mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-09-19 17:01:37 -04:00
Fix warnings in RGBController_HIDLampArray.cpp
This commit is contained in:
1 parent
bfba7e99d0
commit
44c7b9fc07
1 file changed
+5
-5
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user