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/blenloader/intern | |
parent | 97677f572542e0deb4870613edabd7c0f59a63cb (diff) |
Minor optimization: avoid 2x hash, adding to set
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index cd6df354ca7..3cae95d418e 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -283,9 +283,8 @@ LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh) if (BKE_idcode_is_linkable(bhead->code)) { const char *str = BKE_idcode_to_name(bhead->code); - if (!BLI_gset_haskey(gathered, (void *)str)) { + if (BLI_gset_add(gathered, (void *)str)) { BLI_linklist_prepend(&names, strdup(str)); - BLI_gset_insert(gathered, (void *)str); } } } |