diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-02-29 00:48:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-02-29 01:00:21 +0300 |
commit | 0515703b15e11a3faba9650d12053b40d7db31c4 (patch) | |
tree | 3afb641d80bf48c6dd6723c0262a55a201a8f657 /source/blender/blenkernel | |
parent | 97677f572542e0deb4870613edabd7c0f59a63cb (diff) |
Minor optimization: avoid 2x hash, adding to set
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 2defda16313..330b5922c9a 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -1264,8 +1264,7 @@ void BKE_pbvh_get_grid_updates(PBVH *bvh, bool clear, void ***r_gridfaces, int * if (node->flag & PBVH_UpdateNormals) { for (unsigned i = 0; i < node->totprim; ++i) { void *face = bvh->gridfaces[node->prim_indices[i]]; - if (!BLI_gset_haskey(face_set, face)) - BLI_gset_insert(face_set, face); + BLI_gset_add(face_set, face); } if (clear) |