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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user