diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-24 17:47:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-24 17:47:57 +0400 |
commit | 0b88b4fad7427fa8f9b623660188ef1d5432801e (patch) | |
tree | f59b5d13fb2ffc4b2703cd4fa2bd5dd9b79af78d /source/blender/blenkernel/intern/particle_system.c | |
parent | 17679aaa521e8f01e5c10af9b453d7513ee7b5d0 (diff) |
when the size of an edgehash is known or can be guessed,
pass in the argument to reserve the size.
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index f97098b43bf..723b8332ffd 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2484,7 +2484,7 @@ static EdgeHash *sph_springhash_build(ParticleSystem *psys) ParticleSpring *spring; int i = 0; - springhash = BLI_edgehash_new(__func__); + springhash = BLI_edgehash_new_ex(__func__, psys->tot_fluidsprings); for (i=0, spring=psys->fluid_springs; i<psys->tot_fluidsprings; i++, spring++) BLI_edgehash_insert(springhash, spring->particle_index[0], spring->particle_index[1], SET_INT_IN_POINTER(i+1)); |