From 600a627f6e326f4542a876e6e82f771cd3da218f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 3 Apr 2020 16:21:24 +1100 Subject: Cleanup: use abbreviated names for unsigned types in editors --- source/blender/editors/sculpt_paint/paint_utils.c | 27 +++++++++-------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'source/blender/editors/sculpt_paint/paint_utils.c') diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index e67d43d4571..60b4a2f8e0c 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -294,12 +294,8 @@ static void imapaint_tri_weights(float matrix[4][4], } /* compute uv coordinates of mouse in face */ -static void imapaint_pick_uv(Mesh *me_eval, - Scene *scene, - Object *ob_eval, - unsigned int faceindex, - const int xy[2], - float uv[2]) +static void imapaint_pick_uv( + Mesh *me_eval, Scene *scene, Object *ob_eval, uint faceindex, const int xy[2], float uv[2]) { int i, findex; float p[2], w[3], absw, minabsw; @@ -376,10 +372,7 @@ static void imapaint_pick_uv(Mesh *me_eval, } /* returns 0 if not found, otherwise 1 */ -static int imapaint_pick_face(ViewContext *vc, - const int mval[2], - unsigned int *r_index, - unsigned int totpoly) +static int imapaint_pick_face(ViewContext *vc, const int mval[2], uint *r_index, uint totpoly) { if (totpoly == 0) { return 0; @@ -389,7 +382,7 @@ static int imapaint_pick_face(ViewContext *vc, ED_view3d_select_id_validate(vc); *r_index = DRW_select_buffer_sample_point(vc->depsgraph, vc->region, vc->v3d, mval); - if ((*r_index) == 0 || (*r_index) > (unsigned int)totpoly) { + if ((*r_index) == 0 || (*r_index) > (uint)totpoly) { return 0; } @@ -464,8 +457,8 @@ void paint_sample_color( Palette *palette = BKE_paint_palette(paint); PaletteColor *color = NULL; Brush *br = BKE_paint_brush(BKE_paint_get_active_from_context(C)); - unsigned int col; - const unsigned char *cp; + uint col; + const uchar *cp; CLAMP(x, 0, region->winx); CLAMP(y, 0, region->winy); @@ -497,8 +490,8 @@ void paint_sample_color( ViewContext vc; const int mval[2] = {x, y}; - unsigned int faceindex; - unsigned int totpoly = me->totpoly; + uint faceindex; + uint totpoly = me->totpoly; if (CustomData_has_layer(&me_eval->ldata, CD_MLOOPUV)) { ED_view3d_viewcontext_init(C, &vc, depsgraph); @@ -563,7 +556,7 @@ void paint_sample_color( } } else { - unsigned char rgba[4]; + uchar rgba[4]; bilinear_interpolation_color_wrap(ibuf, rgba, NULL, u, v); if (use_palette) { rgb_uchar_to_float(color->rgb, rgba); @@ -598,7 +591,7 @@ void paint_sample_color( x + region->winrct.xmin, y + region->winrct.ymin, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col); glReadBuffer(GL_BACK); } - cp = (unsigned char *)&col; + cp = (uchar *)&col; if (use_palette) { rgb_uchar_to_float(color->rgb, cp); -- cgit v1.2.3