diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-04-03 08:21:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-04-03 08:21:24 +0300 |
commit | 600a627f6e326f4542a876e6e82f771cd3da218f (patch) | |
tree | 9df2dd448e8da7b885d8cf8e56645a062f6d842c /source/blender/editors/curve | |
parent | 04fe37f93116bd3b276ebe86d9fa53f18223ee6a (diff) |
Cleanup: use abbreviated names for unsigned types in editors
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 10 | ||||
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 20 | ||||
-rw-r--r-- | source/blender/editors/curve/editfont.c | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 681b03d691d..de2c3d44caf 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6549,8 +6549,8 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op)) for (nu = editnurb->first; nu; nu = nu->next) { if ((nu->type == CU_BEZIER) && (nu->pntsu > 2)) { - unsigned int span_step[2] = {nu->pntsu, nu->pntsu}; - unsigned int span_len; + uint span_step[2] = {nu->pntsu, nu->pntsu}; + uint span_len; while (BLI_array_iter_span(nu->bezt, nu->pntsu, @@ -6564,9 +6564,9 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op)) BezTriple *bezt_next = &nu->bezt[mod_i(span_step[1] + 1, nu->pntsu)]; int i_span_edge_len = span_len + 1; - const unsigned int dims = 3; + const uint dims = 3; - const unsigned int points_len = ((cu->resolu - 1) * i_span_edge_len) + 1; + const uint points_len = ((cu->resolu - 1) * i_span_edge_len) + 1; float *points = MEM_mallocN(points_len * dims * sizeof(float), __func__); float *points_stride = points; const int points_stride_len = (cu->resolu - 1); @@ -6591,7 +6591,7 @@ static int curve_dissolve_exec(bContext *C, wmOperator *UNUSED(op)) BLI_assert(points_stride + dims == points + (points_len * dims)); float tan_l[3], tan_r[3], error_sq_dummy; - unsigned int error_index_dummy; + uint error_index_dummy; sub_v3_v3v3(tan_l, bezt_prev->vec[1], bezt_prev->vec[2]); normalize_v3(tan_l); diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index d028a88e322..748bf040fbb 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -205,7 +205,7 @@ static bool stroke_elem_project(const struct CurveDrawData *cdd, } else { const ViewDepths *depths = rv3d->depths; - if (depths && ((unsigned int)mval_i[0] < depths->w) && ((unsigned int)mval_i[1] < depths->h)) { + if (depths && ((uint)mval_i[0] < depths->w) && ((uint)mval_i[1] < depths->h)) { const double depth = (double)ED_view3d_depth_read_cached(&cdd->vc, mval_i); if ((depth > depths->depth_range[0]) && (depth < depths->depth_range[1])) { if (ED_view3d_depth_unproject(region, mval_i, depth, r_location_world)) { @@ -798,7 +798,7 @@ static int curve_draw_exec(bContext *C, wmOperator *op) float *coords = MEM_mallocN(sizeof(*coords) * stroke_len * dims, __func__); float *cubic_spline = NULL; - unsigned int cubic_spline_len = 0; + uint cubic_spline_len = 0; /* error in object local space */ const int fit_method = RNA_enum_get(op->ptr, "fit_method"); @@ -827,14 +827,14 @@ static int curve_draw_exec(bContext *C, wmOperator *op) } } - unsigned int *corners = NULL; - unsigned int corners_len = 0; + uint *corners = NULL; + uint corners_len = 0; if ((fit_method == CURVE_PAINT_FIT_METHOD_SPLIT) && (corner_angle < (float)M_PI)) { /* this could be configurable... */ const float corner_radius_min = error_threshold / 8; const float corner_radius_max = error_threshold * 2; - const unsigned int samples_max = 16; + const uint samples_max = 16; curve_fit_corners_detect_fl(coords, stroke_len, @@ -847,9 +847,9 @@ static int curve_draw_exec(bContext *C, wmOperator *op) &corners_len); } - unsigned int *corners_index = NULL; - unsigned int corners_index_len = 0; - unsigned int calc_flag = CURVE_FIT_CALC_HIGH_QUALIY; + uint *corners_index = NULL; + uint corners_index_len = 0; + uint calc_flag = CURVE_FIT_CALC_HIGH_QUALIY; if ((stroke_len > 2) && use_cyclic) { calc_flag |= CURVE_FIT_CALC_CYCLIC; @@ -919,14 +919,14 @@ static int curve_draw_exec(bContext *C, wmOperator *op) if (corners_index) { /* ignore the first and last */ - unsigned int i_start = 0, i_end = corners_index_len; + uint i_start = 0, i_end = corners_index_len; if ((corners_index_len >= 2) && (calc_flag & CURVE_FIT_CALC_CYCLIC) == 0) { i_start += 1; i_end -= 1; } - for (unsigned int i = i_start; i < i_end; i++) { + for (uint i = i_start; i < i_end; i++) { bezt = &nu->bezt[corners_index[i]]; bezt->h1 = bezt->h2 = HD_FREE; } diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 297af4cb72d..dc5dc71106f 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -76,7 +76,7 @@ static int kill_selection(Object *obedit, int ins); /** \name Internal Utilities * \{ */ -static wchar_t findaccent(wchar_t char1, unsigned int code) +static wchar_t findaccent(wchar_t char1, uint code) { wchar_t new = 0; |