From 0b88b4fad7427fa8f9b623660188ef1d5432801e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 24 Aug 2013 13:47:57 +0000 Subject: when the size of an edgehash is known or can be guessed, pass in the argument to reserve the size. --- source/blender/editors/armature/meshlaplacian.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/armature/meshlaplacian.c') diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index 9fe4be7fbf1..16d7f9c9420 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -281,7 +281,7 @@ static void laplacian_system_construct_end(LaplacianSystem *sys) sys->varea = MEM_callocN(sizeof(float) * totvert, "LaplacianSystemVarea"); - sys->edgehash = BLI_edgehash_new(__func__); + sys->edgehash = BLI_edgehash_new_ex(__func__, BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS(sys->totface)); for (a = 0, face = sys->faces; a < sys->totface; a++, face++) { laplacian_increase_edge_count(sys->edgehash, (*face)[0], (*face)[1]); laplacian_increase_edge_count(sys->edgehash, (*face)[1], (*face)[2]); -- cgit v1.2.3