diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-18 05:00:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-18 05:00:52 +0400 |
commit | ee2d95f8507a46a8ac025582c1b6188ff9468046 (patch) | |
tree | 44a9424bdd8564b233bc2b656cf1f1064360061b /source/blender/blenlib/BLI_ghash.h | |
parent | fbb446dff620c0719fd77692a0d401203ef1e966 (diff) |
minor api cleanup for ghash/edgehash
- use single inlined lookup function.
- move comments into source.
- pack iterator vars more efficiently.
Diffstat (limited to 'source/blender/blenlib/BLI_ghash.h')
-rw-r--r-- | source/blender/blenlib/BLI_ghash.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h index d914c32664d..235afb7c8fe 100644 --- a/source/blender/blenlib/BLI_ghash.h +++ b/source/blender/blenlib/BLI_ghash.h @@ -46,8 +46,8 @@ typedef struct GHash GHash; typedef struct GHashIterator { GHash *gh; - unsigned int curBucket; struct Entry *curEntry; + unsigned int curBucket; } GHashIterator; enum { @@ -60,6 +60,7 @@ GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info); void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp); void BLI_ghash_insert(GHash *gh, void *key, void *val); void *BLI_ghash_lookup(GHash *gh, const void *key); +void **BLI_ghash_lookup_p(GHash *gh, const void *key); bool BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp); void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp); void *BLI_ghash_pop(GHash *gh, void *key, GHashKeyFreeFP keyfreefp); |