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>2012-12-11 19:10:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-11 19:10:19 +0400
commit71730f26d7c816854a471c9733ad4c10b88fd357 (patch)
tree0201ace6eac1fd2f48ae404bda6ea552cc1259d4 /source/blender/editors/mesh
parent3520dd56e3894d2b5c825dc98cdd5d846b6756c0 (diff)
replace BLI_array_fixedstack_declare with() new macro BLI_array_alloca() which uses stack memory always and doesn't need to be freed explicitly.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index f18168a25bf..b7b71be0df9 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -2591,10 +2591,8 @@ static void knife_make_chain_cut(KnifeTool_OpData *kcd, BMFace *f, ListBase *cha
BMLoop *lnew, *l_iter;
int i;
int nco = BLI_countlist(chain) - 1;
- float (*cos)[3] = NULL;
- KnifeVert **kverts;
- BLI_array_fixedstack_declare(cos, BM_DEFAULT_NGON_STACK_SIZE, nco, __func__);
- BLI_array_fixedstack_declare(kverts, BM_DEFAULT_NGON_STACK_SIZE, nco, __func__);
+ float (*cos)[3] = BLI_array_alloca(cos, nco);
+ KnifeVert **kverts = BLI_array_alloca(kverts, nco);
kfe = ((Ref *)chain->first)->ref;
v1 = kfe->v1->v ? kfe->v1->v : kfe->v2->v;
@@ -2643,9 +2641,6 @@ static void knife_make_chain_cut(KnifeTool_OpData *kcd, BMFace *f, ListBase *cha
BM_edge_select_set(bm, lnew->e, TRUE);
}
}
-
- BLI_array_fixedstack_free(cos);
- BLI_array_fixedstack_free(kverts);
}
static void knife_make_face_cuts(KnifeTool_OpData *kcd, BMFace *f, ListBase *kfedges)