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/lattice
parent0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff)
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/lattice')
-rw-r--r--source/blender/editors/lattice/editlattice_select.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/lattice/editlattice_select.c b/source/blender/editors/lattice/editlattice_select.c
index 49cf4779496..4497ca1a379 100644
--- a/source/blender/editors/lattice/editlattice_select.c
+++ b/source/blender/editors/lattice/editlattice_select.c
@@ -177,9 +177,6 @@ void LATTICE_OT_select_random(wmOperatorType *ot)
static void ed_lattice_select_mirrored(Lattice *lt, const int axis, const bool extend)
{
const int tot = lt->pntsu * lt->pntsv * lt->pntsw;
- int i;
- BPoint *bp;
- BLI_bitmap *selpoints;
bool flip_uvw[3] = {false};
flip_uvw[axis] = true;
@@ -190,13 +187,13 @@ static void ed_lattice_select_mirrored(Lattice *lt, const int axis, const bool e
}
/* store "original" selection */
- selpoints = BLI_BITMAP_NEW(tot, __func__);
+ BLI_bitmap *selpoints = BLI_BITMAP_NEW(tot, __func__);
BKE_lattice_bitmap_from_flag(lt, selpoints, SELECT, false, false);
/* actual (de)selection */
- for (i = 0; i < tot; i++) {
+ for (int i = 0; i < tot; i++) {
const int i_flip = BKE_lattice_index_flip(lt, i, flip_uvw[0], flip_uvw[1], flip_uvw[2]);
- bp = &lt->def[i];
+ BPoint *bp = &lt->def[i];
if (!bp->hide) {
if (BLI_BITMAP_TEST(selpoints, i_flip)) {
bp->f1 |= SELECT;