diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-27 04:54:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-27 04:58:48 +0300 |
commit | ff0285c4763ab3781604a71b34930eacb743572c (patch) | |
tree | 14391111464fa6cebf40723b4433dc248bc5467c /source/blender/editors | |
parent | 40ba73e443e993c41eca8a564b31e3f3f8cd423b (diff) |
Cleanup: use unsigned char (change previous commit)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 24 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 0be8f91cca6..92871484e66 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -369,8 +369,8 @@ void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]); void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]); // get a theme color from specified space type -void UI_GetThemeColorType3ubv(int colorid, int spacetype, char col[3]); -void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]); +void UI_GetThemeColorType3ubv(int colorid, int spacetype, unsigned char col[3]); +void UI_GetThemeColorType4ubv(int colorid, int spacetype, unsigned char col[4]); // get theme color for coloring monochrome icons bool UI_GetIconThemeColor4fv(int colorid, float col[4]); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index a30dde38852..e79c5266a8e 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1118,7 +1118,7 @@ void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]) col[3] = cp[3]; } -void UI_GetThemeColorType3ubv(int colorid, int spacetype, char col[3]) +void UI_GetThemeColorType3ubv(int colorid, int spacetype, uchar col[3]) { const unsigned char *cp; @@ -1128,7 +1128,7 @@ void UI_GetThemeColorType3ubv(int colorid, int spacetype, char col[3]) col[2] = cp[2]; } -void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]) +void UI_GetThemeColorType4ubv(int colorid, int spacetype, uchar col[4]) { const unsigned char *cp; diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 6787d2519a7..ca1251ef728 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -96,12 +96,12 @@ #define KNIFE_FLT_EPS_PX_FACE 0.05f typedef struct KnifeColors { - unsigned char line[3]; - unsigned char edge[3]; - unsigned char curpoint[3]; - unsigned char curpoint_a[4]; - unsigned char point[3]; - unsigned char point_a[4]; + uchar line[3]; + uchar edge[3]; + uchar curpoint[3]; + uchar curpoint_a[4]; + uchar point[3]; + uchar point_a[4]; } KnifeColors; /* knifetool operator */ @@ -1027,13 +1027,13 @@ static void knife_init_colors(KnifeColors *colors) /* possible BMESH_TODO: add explicit themes or calculate these by * figuring out contrasting colors with grid / edges / verts * a la UI_make_axis_color */ - UI_GetThemeColorType3ubv(TH_NURB_VLINE, SPACE_VIEW3D, (char *)colors->line); - UI_GetThemeColorType3ubv(TH_NURB_ULINE, SPACE_VIEW3D, (char *)colors->edge); - UI_GetThemeColorType3ubv(TH_HANDLE_SEL_VECT, SPACE_VIEW3D, (char *)colors->curpoint); - UI_GetThemeColorType3ubv(TH_HANDLE_SEL_VECT, SPACE_VIEW3D, (char *)colors->curpoint_a); + UI_GetThemeColorType3ubv(TH_NURB_VLINE, SPACE_VIEW3D, colors->line); + UI_GetThemeColorType3ubv(TH_NURB_ULINE, SPACE_VIEW3D, colors->edge); + UI_GetThemeColorType3ubv(TH_HANDLE_SEL_VECT, SPACE_VIEW3D, colors->curpoint); + UI_GetThemeColorType3ubv(TH_HANDLE_SEL_VECT, SPACE_VIEW3D, colors->curpoint_a); colors->curpoint_a[3] = 102; - UI_GetThemeColorType3ubv(TH_ACTIVE_SPLINE, SPACE_VIEW3D, (char *)colors->point); - UI_GetThemeColorType3ubv(TH_ACTIVE_SPLINE, SPACE_VIEW3D, (char *)colors->point_a); + UI_GetThemeColorType3ubv(TH_ACTIVE_SPLINE, SPACE_VIEW3D, colors->point); + UI_GetThemeColorType3ubv(TH_ACTIVE_SPLINE, SPACE_VIEW3D, colors->point_a); colors->point_a[3] = 102; } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 3ca7a510300..75ad18da3b9 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1627,7 +1627,7 @@ static void outliner_draw_tree_element( const bool is_selected = (base != NULL) && ((base->flag & BASE_SELECTED) != 0); if (ob == obact || is_selected) { - char col[4] = {0, 0, 0, 0}; + uchar col[4] = {0, 0, 0, 0}; /* outliner active ob: always white text, circle color now similar to view3d */ |