diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-08-05 21:20:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-08-05 21:35:22 +0300 |
commit | b4a325f535e56e37f1a22c12f189b39552fd6ba7 (patch) | |
tree | 8cf0375dbd598546b7cee0891e578682bfd27646 /source/blender/editors/interface/interface_icons.c | |
parent | 17f299c5d14f0435595afe51c4153ae4037bb81b (diff) |
Cleanup: use unsigned char for theme colors
Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.
Declare as uchar to remove the need for casts.
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 7584a43a790..e9aa18394fa 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -403,7 +403,7 @@ static void vicon_handletype_auto_clamp_draw(int x, int y, int w, int h, float a static void vicon_colorset_draw(int index, int x, int y, int w, int h, float UNUSED(alpha)) { bTheme *btheme = UI_GetTheme(); - ThemeWireColor *cs = &btheme->tarm[index]; + const ThemeWireColor *cs = &btheme->tarm[index]; /* Draw three bands of color: One per color * x-----a-----b-----c @@ -420,15 +420,15 @@ static void vicon_colorset_draw(int index, int x, int y, int w, int h, float UNU /* XXX: Include alpha into this... */ /* normal */ - immUniformColor3ubv((uchar *)cs->solid); + immUniformColor3ubv(cs->solid); immRecti(pos, x, y, a, y + h); /* selected */ - immUniformColor3ubv((uchar *)cs->select); + immUniformColor3ubv(cs->select); immRecti(pos, a, y, b, y + h); /* active */ - immUniformColor3ubv((uchar *)cs->active); + immUniformColor3ubv(cs->active); immRecti(pos, b, y, c, y + h); immUnbindProgram(); @@ -1782,7 +1782,7 @@ static void icon_draw_size(float x, enum eIconSizes size, int draw_size, const float desaturate, - const char mono_rgba[4], + const uchar mono_rgba[4], const bool mono_border) { bTheme *btheme = UI_GetTheme(); @@ -2270,7 +2270,7 @@ void UI_icon_draw_ex(float x, float aspect, float alpha, float desaturate, - const char mono_color[4], + const uchar mono_color[4], const bool mono_border) { int draw_size = get_draw_size(ICON_SIZE_ICON); |