Skip to content

Commit

Permalink
Suppress MSVC compiler possible loss of data warning with explicit …
Browse files Browse the repository at this point in the history
…cast
  • Loading branch information
pabdulin committed Jan 23, 2024
1 parent 6c6260a commit b3b04fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nuklear_color.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3b04fc

Please sign in to comment.