diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-28 23:33:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-28 23:33:14 +0400 |
commit | 4f90d757c79bc665c9e4d1cd32573d47e76d2ddd (patch) | |
tree | 6c4d74e8f9c985254e36304764e9b31eb3d15d53 /source/blender/editors/sculpt_paint | |
parent | 131de4352b9e8f3e4ce77d2d9dc145f5db461aed (diff) |
add BLI_ghash_pop() which returns the value for a key and removes it at the same time, saves a lookup if you need to check if the item exists before removing.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index c5c08a94ae5..e05191dad3b 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2100,8 +2100,7 @@ static char *wpaint_make_validmap(Object *ob) if (chan->bone->flag & BONE_NO_DEFORM) continue; - if (BLI_ghash_haskey(gh, chan->name)) { - BLI_ghash_remove(gh, chan->name, NULL, NULL); + if (BLI_ghash_remove(gh, chan->name, NULL, NULL)) { BLI_ghash_insert(gh, chan->name, SET_INT_IN_POINTER(1)); } } |