Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-18 07:41:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-18 07:41:39 +0400
commit754b4ab3bcbc92df0bcdff4848ef5ffc9410dce2 (patch)
treefa1dd64c56c0822962369d2d095f66b76f758e3a /source/blender/blenkernel/intern/object_deform.c
parent7cce5563445a5363f9d125bf8c3cb30734cabdfe (diff)
add hash function BLI_ghash_assign, BLI_edgehash_assign
avoids remove,insert and only hashes the key once.
Diffstat (limited to 'source/blender/blenkernel/intern/object_deform.c')
-rw-r--r--source/blender/blenkernel/intern/object_deform.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c
index bfec38419f1..ca38aa42928 100644
--- a/source/blender/blenkernel/intern/object_deform.c
+++ b/source/blender/blenkernel/intern/object_deform.c
@@ -100,11 +100,13 @@ bool *BKE_objdef_validmap_get(Object *ob, const int defbase_tot)
bPoseChannel *chan;
for (chan = pose->chanbase.first; chan; chan = chan->next) {
+ void **val_p;
if (chan->bone->flag & BONE_NO_DEFORM)
continue;
- if (BLI_ghash_remove(gh, chan->name, NULL, NULL)) {
- BLI_ghash_insert(gh, chan->name, SET_INT_IN_POINTER(1));
+ val_p = BLI_ghash_lookup_p(gh, chan->name);
+ if (val_p) {
+ *val_p = SET_INT_IN_POINTER(1);
}
}
}