Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-10-31 18:07:36 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-11-04 12:54:59 +0300
commite236f5b5749f256034e7605a66f611f1fad74c41 (patch)
tree9db334e7b8760bef134801417336c6e0785e4269 /source/blender/editors/mask/mask_edit.c
parent3d55d80c59d97ce12d1e5f344e7f1aaf1c9c2a4f (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.c10
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;