Fix another possible loss of data warning in QMK controllers

This commit is contained in:
Adam Honse 2024-08-08 21:05:14 -05:00
parent e8bf3c35dc
commit 2f3017fdfc
4 changed files with 8 additions and 8 deletions

View file

@ -584,8 +584,8 @@ void RGBController_QMKOpenRGBRev9::PlaceLEDsInMaps
{
bool underglow = led_flags[i] & 2;
x = std::round(led_points[i].x/divisor);
y = std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y));
x = (unsigned int)(std::round(led_points[i].x / divisor));
y = (unsigned int)(std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y)));
if(!underglow)
{

View file

@ -625,8 +625,8 @@ void RGBController_QMKOpenRGBRevB::PlaceLEDsInMaps
{
bool underglow = led_flags[i] & 2;
x = std::round(led_points[i].x/divisor);
y = std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y));
x = (unsigned int)(std::round(led_points[i].x / divisor));
y = (unsigned int)(std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y)));
if(!underglow)
{

View file

@ -626,8 +626,8 @@ void RGBController_QMKOpenRGBRevD::PlaceLEDsInMaps
{
bool underglow = led_flags[i] & 2;
x = std::round(led_points[i].x/divisor);
y = std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y));
x = (unsigned int)(std::round(led_points[i].x / divisor));
y = (unsigned int)(std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y)));
if(!underglow)
{

View file

@ -642,8 +642,8 @@ void RGBController_QMKOpenRGBRevE::PlaceLEDsInMaps
{
bool underglow = led_flags[i] & 2;
x = std::round(led_points[i].x/divisor);
y = std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y));
x = (unsigned int)(std::round(led_points[i].x / divisor));
y = (unsigned int)(std::distance(unique_rows.begin(), unique_rows.find(led_points[i].y)));
if(!underglow)
{