From aa60b9338ab679853d36322829458ccb7b4f06d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Mar 2020 17:32:25 +1100 Subject: Cleanup: use 'const' style argument --- source/blender/editors/interface/view2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/interface/view2d.c') diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index af32143df33..8ea1bd3ede6 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -243,7 +243,7 @@ static void view2d_masks(View2D *v2d, bool check_scrollers, const rcti *mask_scr void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) { bool tot_changed = false, do_init; - uiStyle *style = UI_style_get(); + const uiStyle *style = UI_style_get(); do_init = (v2d->flag & V2D_IS_INITIALISED) == 0; -- cgit v1.2.3 From 868573451f8bfacac25b1b6d53ff05e831508087 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Mar 2020 11:53:08 +1100 Subject: Cleanup: use unsigned char for UI_view2d_text_cache_add Avoids casts when used with other UI code where the color is often unsigned. --- source/blender/editors/interface/view2d.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/interface/view2d.c') diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 8ea1bd3ede6..ad2e32149d8 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -2146,7 +2146,7 @@ static MemArena *g_v2d_strings_arena = NULL; static View2DString *g_v2d_strings = NULL; void UI_view2d_text_cache_add( - View2D *v2d, float x, float y, const char *str, size_t str_len, const char col[4]) + View2D *v2d, float x, float y, const char *str, size_t str_len, const uchar col[4]) { int mval[2]; @@ -2177,7 +2177,7 @@ void UI_view2d_text_cache_add( /* no clip (yet) */ void UI_view2d_text_cache_add_rectf( - View2D *v2d, const rctf *rect_view, const char *str, size_t str_len, const char col[4]) + View2D *v2d, const rctf *rect_view, const char *str, size_t str_len, const uchar col[4]) { rcti rect; -- cgit v1.2.3