BMesh: store stackdepth as an index

Avoids -1 all over.
This commit is contained in:
2015-12-22 15:57:45 +11:00
parent ee2b583a05
commit a9c881f6a3
4 changed files with 16 additions and 16 deletions

View File

@@ -143,7 +143,7 @@ BMesh *BM_mesh_create(const BMAllocTemplate *allocsize)
bm_mempool_init(bm, allocsize);
/* allocate one flag pool that we don't get rid of. */
bm->stackdepth = 1;
bm->toolflag_index = 0;
bm->totflags = 0;
CustomData_reset(&bm->vdata);
@@ -246,7 +246,7 @@ void BM_mesh_clear(BMesh *bm)
/* allocate the memory pools for the mesh elements */
bm_mempool_init(bm, &bm_mesh_allocsize_default);
bm->stackdepth = 1;
bm->toolflag_index = 0;
bm->totflags = 0;
CustomData_reset(&bm->vdata);