diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-24 07:31:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-24 07:31:00 +0400 |
commit | 5342d57a5eb8f45549bcca81db611ac75188b060 (patch) | |
tree | 049a354eee6407512a44e5694a127155858bcd85 /source/blender/editors/mesh/editmesh_utils.c | |
parent | 464e9b8777134ef18d78d4605ec50d030c9a0df8 (diff) |
allocate bmesh data from known sizes where possible (was still using defaults in places),
add macros for initializing BMAllocTemplate's, also add assert on invalid use of bmesh_sfme()
Diffstat (limited to 'source/blender/editors/mesh/editmesh_utils.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index a64a23a9f4a..e457f7c45af 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -662,10 +662,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata)) UndoMesh *um = umv; BMesh *bm; - const BMAllocTemplate allocsize = {um->me.totvert, - um->me.totedge, - um->me.totloop, - um->me.totpoly}; + const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_ME(&um->me); ob->shapenr = em->bm->shapenr = um->shapenr; |