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:
authorCampbell Barton <ideasman42@gmail.com>2015-12-22 07:57:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-22 08:41:01 +0300
commita9c881f6a3c15a636f398e9340d8daab290513f7 (patch)
treebf177be1ab98d9d1108b24bc366564034917d60a /source/blender/bmesh/intern/bmesh_operators.c
parentee2b583a059777162ce68eaa705481c210805513 (diff)
BMesh: store stackdepth as an index
Avoids -1 all over.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_operators.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c
index 5f224813d8d..960ff568e93 100644
--- a/source/blender/bmesh/intern/bmesh_operators.c
+++ b/source/blender/bmesh/intern/bmesh_operators.c
@@ -97,12 +97,12 @@ void BMO_op_flag_disable(BMesh *UNUSED(bm), BMOperator *op, const int op_flag)
*/
void BMO_push(BMesh *bm, BMOperator *UNUSED(op))
{
- bm->stackdepth++;
+ bm->toolflag_index++;
BLI_assert(bm->totflags > 0);
/* add flag layer, if appropriate */
- if (bm->stackdepth > 1)
+ if (bm->toolflag_index > 0)
bmo_flag_layer_alloc(bm);
else
bmo_flag_layer_clear(bm);
@@ -117,10 +117,10 @@ void BMO_push(BMesh *bm, BMOperator *UNUSED(op))
*/
void BMO_pop(BMesh *bm)
{
- if (bm->stackdepth > 1)
+ if (bm->toolflag_index > 0)
bmo_flag_layer_free(bm);
- bm->stackdepth--;
+ bm->toolflag_index--;
}
@@ -214,11 +214,11 @@ void BMO_op_exec(BMesh *bm, BMOperator *op)
BMO_push(bm, op);
- if (bm->stackdepth == 2)
+ if (bm->toolflag_index == 1)
bmesh_edit_begin(bm, op->type_flag);
op->exec(bm, op);
- if (bm->stackdepth == 2)
+ if (bm->toolflag_index == 1)
bmesh_edit_end(bm, op->type_flag);
BMO_pop(bm);