Suppress MSVC compiler `possible loss of data` warning with explicit cast
This commit is contained in:
parent
6c6260a7c2
commit
b3b04fca16
|
@ -27,9 +27,9 @@ nk_rgb_factor(struct nk_color col, const float factor)
|
||||||
{
|
{
|
||||||
if (factor == 1.0f)
|
if (factor == 1.0f)
|
||||||
return col;
|
return col;
|
||||||
col.r *= factor;
|
col.r = (nk_byte)(col.r * factor);
|
||||||
col.g *= factor;
|
col.g = (nk_byte)(col.g * factor);
|
||||||
col.b *= factor;
|
col.b = (nk_byte)(col.b * factor);
|
||||||
return col;
|
return col;
|
||||||
}
|
}
|
||||||
NK_API struct nk_color
|
NK_API struct nk_color
|
||||||
|
|
Loading…
Reference in New Issue