[Bf-blender-cvs] [d83b1ca] temp-ghash-basis: minor edits

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


Commit: d83b1ca32b02e057a2e8c32d75e8d6b5677f2773
Author: Campbell Barton
Date:   Fri Mar 20 02:58:42 2015 +1100
Branches: temp-ghash-basis
https://developer.blender.org/rBd83b1ca32b02e057a2e8c32d75e8d6b5677f2773

minor edits

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

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 f6ddbfe..a9406fc 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -276,7 +276,7 @@ static void ghash_buckets_expand(
 		return;
 	}
 
-	gh->limit_grow = GHASH_LIMIT_GROW(new_nbuckets);
+	gh->limit_grow   = GHASH_LIMIT_GROW(new_nbuckets);
 	gh->limit_shrink = GHASH_LIMIT_SHRINK(new_nbuckets);
 	ghash_buckets_resize(gh, new_nbuckets);
 }
@@ -324,7 +324,7 @@ static void ghash_buckets_contract(
 		return;
 	}
 
-	gh->limit_grow = GHASH_LIMIT_GROW(new_nbuckets);
+	gh->limit_grow   = GHASH_LIMIT_GROW(new_nbuckets);
 	gh->limit_shrink = GHASH_LIMIT_SHRINK(new_nbuckets);
 	ghash_buckets_resize(gh, new_nbuckets);
 }
@@ -347,7 +347,7 @@ BLI_INLINE void ghash_buckets_reset(GHash *gh, const unsigned int nentries)
 	gh->bucket_mask = gh->nbuckets - 1;
 #endif
 
-	gh->limit_grow = GHASH_LIMIT_GROW(gh->nbuckets);
+	gh->limit_grow   = GHASH_LIMIT_GROW(gh->nbuckets);
 	gh->limit_shrink = GHASH_LIMIT_SHRINK(gh->nbuckets);
 
 	gh->nentries = 0;
@@ -586,10 +586,12 @@ static GHash *ghash_copy(GHash *gh, GHashKeyCopyFP keycopyfp, GHashValCopyFP val
 
 			ghash_entry_copy(gh_new, e_new, gh, e, hash, keycopyfp, valcopyfp);
 
-			/* Warning! This means entries in buckets in new copy will be in reversed order!
-			 *          This shall not be an issue though, since order should never be assumed in ghash. */
-			/* Note: We cannot use i here, since there is no guaranty that gh and gh_new
-			 *       have the same number of buckets! */
+			/* Warning!
+			 * This means entries in buckets in new copy will be in reversed order!
+			 * This shall not be an issue though, since order should never be assumed in ghash. */
+
+			/* Note: We can't use 'i' here, since there is no guaranty that 'gh' and 'gh_new'
+			 * have the same number of buckets! */
 			e_new->next = gh_new->buckets[gh_new_bucket_hash];
 			gh_new->buckets[gh_new_bucket_hash] = e_new;
 		}




More information about the Bf-blender-cvs mailing list