Compare commits

...

3 Commits

Author SHA1 Message Date
Rob Loach
9d9781d5e2
Merge pull request #606 from pabdulin/fix-possible-loss-of-data
Suppress compiler `possible loss of data` warning with explicit cast
2024-01-25 15:31:24 -05:00
Petr Abdulin
b3b04fca16 Suppress MSVC compiler possible loss of data warning with explicit cast 2024-01-23 09:18:21 +07:00
Petr Abdulin
6c6260a7c2 Suppress MSVC compiler possible loss of data warning with explicit cast 2024-01-22 23:11:50 +07:00
2 changed files with 6 additions and 6 deletions

View File

@ -7662,9 +7662,9 @@ nk_rgb_factor(struct nk_color col, const float factor)
{
if (factor == 1.0f)
return col;
col.r *= factor;
col.g *= factor;
col.b *= factor;
col.r = (nk_byte)(col.r * factor);
col.g = (nk_byte)(col.g * factor);
col.b = (nk_byte)(col.b * factor);
return col;
}
NK_API struct nk_color

View File

@ -27,9 +27,9 @@ nk_rgb_factor(struct nk_color col, const float factor)
{
if (factor == 1.0f)
return col;
col.r *= factor;
col.g *= factor;
col.b *= factor;
col.r = (nk_byte)(col.r * factor);
col.g = (nk_byte)(col.g * factor);
col.b = (nk_byte)(col.b * factor);
return col;
}
NK_API struct nk_color