[Bf-blender-cvs] [bfd0ded] temp-ghash-basis: fix for error clearning a gset, was removing the gset flag

Campbell Barton noreply at git.blender.org
Thu Mar 19 17:06:55 CET 2015


Commit: bfd0ded77e818118ded6c0ca80e03dc9c4841d12
Author: Campbell Barton
Date:   Fri Mar 20 03:06:12 2015 +1100
Branches: temp-ghash-basis
https://developer.blender.org/rBbfd0ded77e818118ded6c0ca80e03dc9c4841d12

fix for error clearning a gset, was removing the gset flag

===================================================================

M	source/blender/blenlib/intern/BLI_ghash.c

===================================================================

diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 41e5cbb..2819005 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -351,7 +351,6 @@ BLI_INLINE void ghash_buckets_reset(GHash *gh, const unsigned int nentries)
 	gh->limit_shrink = GHASH_LIMIT_SHRINK(gh->nbuckets);
 
 	gh->nentries = 0;
-	gh->flag = 0;
 
 	ghash_buckets_expand(gh, nentries, (nentries != 0));
 }
@@ -417,9 +416,10 @@ static GHash *ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info,
 	gh->cmpfp = cmpfp;
 
 	gh->buckets = NULL;
+	gh->flag = flag;
+
 	ghash_buckets_reset(gh, nentries_reserve);
 	gh->entrypool = BLI_mempool_create(GHASH_ENTRY_SIZE(flag & GHASH_FLAG_IS_GSET), 64, 64, BLI_MEMPOOL_NOP);
-	gh->flag |= flag;
 
 	return gh;
 }




More information about the Bf-blender-cvs mailing list