From 5c74b0964bd624fb10e1293920d8df3b089115dd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 27 Mar 2020 11:16:17 +1100 Subject: Cleanup: add iterator macros to clang-format Also rename START to BEGIN (matching BEGIN/END for most iterator macros). --- source/blender/editors/gpencil/gpencil_select.c | 9 +++------ source/blender/editors/gpencil/gpencil_uv.c | 3 +-- source/blender/editors/interface/view2d.c | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 03e8001341f..f5cd9791324 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -1052,8 +1052,7 @@ static int gpencil_circle_select_exec(bContext *C, wmOperator *op) rect.ymax = my + radius; /* find visible strokes, and select if hit */ - GP_EVALUATED_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) - { + GP_EVALUATED_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) { changed |= gp_stroke_do_circle_sel(gpd, gpl, gps, @@ -1180,8 +1179,7 @@ static int gpencil_generic_select_exec(bContext *C, } /* select/deselect points */ - GP_EVALUATED_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) - { + GP_EVALUATED_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) { bGPDstroke *gps_active = (gps->runtime.gps_orig) ? gps->runtime.gps_orig : gps; bGPDspoint *pt; @@ -1473,8 +1471,7 @@ static int gpencil_select_exec(bContext *C, wmOperator *op) /* First Pass: Find stroke point which gets hit */ /* XXX: maybe we should go from the top of the stack down instead... */ - GP_EVALUATED_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) - { + GP_EVALUATED_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) { bGPDstroke *gps_active = (gps->runtime.gps_orig) ? gps->runtime.gps_orig : gps; bGPDspoint *pt; int i; diff --git a/source/blender/editors/gpencil/gpencil_uv.c b/source/blender/editors/gpencil/gpencil_uv.c index 1da32dcc537..5f15a6f5411 100644 --- a/source/blender/editors/gpencil/gpencil_uv.c +++ b/source/blender/editors/gpencil/gpencil_uv.c @@ -176,8 +176,7 @@ static bool gpencil_uv_transform_init(bContext *C, wmOperator *op, const bool is float center[3] = {0.0f}; int i = 0; /* Need use evaluated to get the viewport final position. */ - GP_EVALUATED_STROKES_BEGIN(gpstroke_iter, C, gpl, gps) - { + GP_EVALUATED_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) { if (gps->flag & GP_STROKE_SELECT) { float r_center[3]; gpencil_stroke_center(gps, r_center); diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 73dda74fed8..adf0d6e372c 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -67,8 +67,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas BLI_INLINE int clamp_float_to_int(const float f) { - const float min = (float) INT_MIN; - const float max = (float) INT_MAX; + const float min = (float)INT_MIN; + const float max = (float)INT_MAX; if (UNLIKELY(f < min)) { return min; -- cgit v1.2.3