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:
authorJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
committerJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
commit63916f5941b443dfc8566682bb75374e5abd553f (patch)
treefb0704701f1d4d9acbddf4a6fbc62c819d8d4c36 /source/blender/editors/gpencil/gpencil_edit.c
parent0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff)
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 37338ec4592..ac8085f0e53 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -4725,7 +4725,6 @@ static int gpencil_cutter_lasso_select(bContext *C,
const float scale = ts->gp_sculpt.isect_threshold;
bGPDspoint *pt;
- int i;
GP_SpaceConversion gsc = {NULL};
bool changed = false;
@@ -4741,6 +4740,7 @@ static int gpencil_cutter_lasso_select(bContext *C,
/* deselect all strokes first */
CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {
+ int i;
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
pt->flag &= ~GP_SPOINT_SELECT;
}
@@ -4753,7 +4753,7 @@ static int gpencil_cutter_lasso_select(bContext *C,
GP_EDITABLE_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) {
int tot_inside = 0;
const int oldtot = gps->totpoints;
- for (i = 0; i < gps->totpoints; i++) {
+ for (int i = 0; i < gps->totpoints; i++) {
pt = &gps->points[i];
if ((pt->flag & GP_SPOINT_SELECT) || (pt->flag & GP_SPOINT_TAG)) {
continue;
@@ -4777,7 +4777,7 @@ static int gpencil_cutter_lasso_select(bContext *C,
}
/* if mark all points inside lasso set to remove all stroke */
if ((tot_inside == oldtot) || ((tot_inside == 1) && (oldtot == 2))) {
- for (i = 0; i < gps->totpoints; i++) {
+ for (int i = 0; i < gps->totpoints; i++) {
pt = &gps->points[i];
pt->flag |= GP_SPOINT_SELECT;
}