diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-10-31 18:07:36 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-11-04 12:54:59 +0300 |
commit | e236f5b5749f256034e7605a66f611f1fad74c41 (patch) | |
tree | 9db334e7b8760bef134801417336c6e0785e4269 /source/blender/editors/mask/mask_edit.c | |
parent | 3d55d80c59d97ce12d1e5f344e7f1aaf1c9c2a4f (diff) |
Masking: Cleanup, limit variable scope
Diffstat (limited to 'source/blender/editors/mask/mask_edit.c')
-rw-r--r-- | source/blender/editors/mask/mask_edit.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index 0c5591ed89b..56d8ef56160 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -371,7 +371,6 @@ void ED_mask_cursor_location_get(ScrArea *sa, float cursor[2]) bool ED_mask_selected_minmax(const bContext *C, float min[2], float max[2]) { Mask *mask = CTX_data_edit_mask(C); - MaskLayer *mask_layer; bool ok = false; if (mask == NULL) { @@ -379,15 +378,14 @@ bool ED_mask_selected_minmax(const bContext *C, float min[2], float max[2]) } INIT_MINMAX2(min, max); - for (mask_layer = mask->masklayers.first; mask_layer != NULL; mask_layer = mask_layer->next) { - MaskSpline *spline; + for (MaskLayer *mask_layer = mask->masklayers.first; mask_layer != NULL; + mask_layer = mask_layer->next) { if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) { continue; } - for (spline = mask_layer->splines.first; spline != NULL; spline = spline->next) { + for (MaskSpline *spline = mask_layer->splines.first; spline != NULL; spline = spline->next) { MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline); - int i; - for (i = 0; i < spline->tot_point; i++) { + for (int i = 0; i < spline->tot_point; i++) { MaskSplinePoint *point = &spline->points[i]; MaskSplinePoint *deform_point = &points_array[i]; BezTriple *bezt = &point->bezt; |