diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-08-12 07:26:29 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-08-12 07:29:40 +0400 |
commit | 6be4b395260816becfeb992d23045bbfa9d58355 (patch) | |
tree | 4fb36a79fdfa3e0c4f6512d9f337be477290353f /source/blender/blenlib/intern/BLI_ghash.c | |
parent | b65a0228920df21b7f5a0a057bc9ad5fad64e4b3 (diff) |
GHash: add flag get/set for gset
Diffstat (limited to 'source/blender/blenlib/intern/BLI_ghash.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_ghash.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 1227623be94..74d7fdc88cb 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -972,6 +972,17 @@ void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp) { BLI_ghash_free((GHash *)gs, keyfreefp, NULL); } + +void BLI_gset_flag_set(GSet *gs, unsigned int flag) +{ + ((GHash *)gs)->flag |= flag; +} + +void BLI_gset_flag_clear(GSet *gs, unsigned int flag) +{ + ((GHash *)gs)->flag &= ~flag; +} + /** \} */ @@ -1010,6 +1021,8 @@ GSet *BLI_gset_pair_new(const char *info) /** * Measure how well the hash function performs * (1.0 is approx as good as random distribution). + * + * Smaller is better! */ double BLI_ghash_calc_quality(GHash *gh) { |