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/bmesh/intern/bmesh_construct.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/bmesh/intern/bmesh_construct.c')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_construct.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c index 60d9b62d6b9..930964667e9 100644 --- a/source/blender/bmesh/intern/bmesh_construct.c +++ b/source/blender/bmesh/intern/bmesh_construct.c @@ -911,10 +911,7 @@ BMesh *BM_mesh_copy(BMesh *bm_old) BMEditSelection *ese; BMIter iter; int i; - const BMAllocTemplate allocsize = {bm_old->totvert, - bm_old->totedge, - bm_old->totloop, - bm_old->totface}; + const BMAllocTemplate allocsize = BMALLOC_TEMPLATE_FROM_BM(bm_old); /* allocate a bmesh */ bm_new = BM_mesh_create(&allocsize); |