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/blenlib/BLI_ghash.h | |
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/blenlib/BLI_ghash.h')
-rw-r--r-- | source/blender/blenlib/BLI_ghash.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h index 9034e8e51d9..c26e6cd15b3 100644 --- a/source/blender/blenlib/BLI_ghash.h +++ b/source/blender/blenlib/BLI_ghash.h @@ -70,6 +70,7 @@ void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfre void BLI_ghash_insert(GHash *gh, void *key, void *val); void *BLI_ghash_lookup(GHash *gh, const void *key); int BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp); +void *BLI_ghash_pop(GHash *gh, void *key, GHashKeyFreeFP keyfreefp); int BLI_ghash_haskey(GHash *gh, void *key); int BLI_ghash_size(GHash *gh); |