[Bf-blender-cvs] [4ae0b3e] temp-ghash-basis: remove unneeded ghash strink calls & dont force expand/shrink to be inline
Campbell Barton
noreply at git.blender.org
Thu Mar 19 16:47:39 CET 2015
Commit: 4ae0b3ef9c745f5f7d77457548d0fd709e9b3087
Author: Campbell Barton
Date: Fri Mar 20 02:46:53 2015 +1100
Branches: temp-ghash-basis
https://developer.blender.org/rB4ae0b3ef9c745f5f7d77457548d0fd709e9b3087
remove unneeded ghash strink calls & dont force expand/shrink to be inline
===================================================================
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 18a0e49..4f5405b 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -237,7 +237,7 @@ static void ghash_buckets_resize(GHash *gh, const unsigned int nbuckets)
* Check if the number of items in the GHash is large enough to require more buckets,
* or small enough to require less buckets, and resize \a gh accordingly.
*/
-BLI_INLINE void ghash_buckets_expand(
+static void ghash_buckets_expand(
GHash *gh, const unsigned int nentries, const bool user_defined)
{
unsigned int new_nbuckets;
@@ -281,7 +281,7 @@ BLI_INLINE void ghash_buckets_expand(
ghash_buckets_resize(gh, new_nbuckets);
}
-BLI_INLINE void ghash_buckets_shrink(
+static void ghash_buckets_shrink(
GHash *gh, const unsigned int nentries, const bool user_defined, const bool force_shrink)
{
unsigned int new_nbuckets;
@@ -352,7 +352,6 @@ BLI_INLINE void ghash_buckets_reset(GHash *gh, const unsigned int nentries)
gh->flag = 0;
ghash_buckets_expand(gh, nentries, (nentries != 0));
- ghash_buckets_shrink(gh, nentries, (nentries != 0), false);
}
/**
@@ -574,7 +573,6 @@ static GHash *ghash_copy(GHash *gh, GHashKeyCopyFP keycopyfp, GHashValCopyFP val
gh_new = ghash_new(gh->hashfp, gh->cmpfp, __func__, 0, is_gset);
ghash_buckets_expand(gh_new, gh->nentries, false);
- ghash_buckets_shrink(gh_new, gh->nentries, false, false);
for (i = 0; i < gh->nbuckets; i++) {
Entry *e;
More information about the Bf-blender-cvs
mailing list