Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-03-21 08:40:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-21 08:40:43 +0300
commit0025d90b98c69dd4ed149918e716b92c81328bbb (patch)
tree6fd0b9776b5cd104a46036a42d95e25f1e74f943 /source/blender/blenlib/intern/BLI_ghash.c
parente0611ca832d793694cbda0fbae1a4388b81fc589 (diff)
Cleanup: use tabs
Diffstat (limited to 'source/blender/blenlib/intern/BLI_ghash.c')
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index a2233c38270..49d3cecafed 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -547,8 +547,8 @@ static void ghash_free_cb(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP va
{
unsigned int i;
- BLI_assert(keyfreefp || valfreefp);
- BLI_assert(!valfreefp|| !(gh->flag & GHASH_FLAG_IS_GSET));
+ BLI_assert(keyfreefp || valfreefp);
+ BLI_assert(!valfreefp || !(gh->flag & GHASH_FLAG_IS_GSET));
for (i = 0; i < gh->nbuckets; i++) {
Entry *e;
@@ -1370,37 +1370,37 @@ double BLI_ghash_calc_quality_ex(
}
{
- uint64_t sum = 0;
- uint64_t overloaded_buckets_threshold = (uint64_t)max_ii(GHASH_LIMIT_GROW(1), 1);
- uint64_t sum_overloaded = 0;
- uint64_t sum_empty = 0;
-
- for (i = 0; i < gh->nbuckets; i++) {
- uint64_t count = 0;
- Entry *e;
- for (e = gh->buckets[i]; e; e = e->next) {
- count++;
- }
- if (r_biggest_bucket) {
- *r_biggest_bucket = max_ii(*r_biggest_bucket, (int)count);
- }
- if (r_prop_overloaded_buckets && (count > overloaded_buckets_threshold)) {
- sum_overloaded++;
- }
- if (r_prop_empty_buckets && !count) {
- sum_empty++;
- }
- sum += count * (count + 1);
- }
- if (r_prop_overloaded_buckets) {
- *r_prop_overloaded_buckets = (double)sum_overloaded / (double)gh->nbuckets;
- }
- if (r_prop_empty_buckets) {
- *r_prop_empty_buckets = (double)sum_empty / (double)gh->nbuckets;
- }
- return ((double)sum * (double)gh->nbuckets /
- ((double)gh->nentries * (gh->nentries + 2 * gh->nbuckets - 1)));
- }
+ uint64_t sum = 0;
+ uint64_t overloaded_buckets_threshold = (uint64_t)max_ii(GHASH_LIMIT_GROW(1), 1);
+ uint64_t sum_overloaded = 0;
+ uint64_t sum_empty = 0;
+
+ for (i = 0; i < gh->nbuckets; i++) {
+ uint64_t count = 0;
+ Entry *e;
+ for (e = gh->buckets[i]; e; e = e->next) {
+ count++;
+ }
+ if (r_biggest_bucket) {
+ *r_biggest_bucket = max_ii(*r_biggest_bucket, (int)count);
+ }
+ if (r_prop_overloaded_buckets && (count > overloaded_buckets_threshold)) {
+ sum_overloaded++;
+ }
+ if (r_prop_empty_buckets && !count) {
+ sum_empty++;
+ }
+ sum += count * (count + 1);
+ }
+ if (r_prop_overloaded_buckets) {
+ *r_prop_overloaded_buckets = (double)sum_overloaded / (double)gh->nbuckets;
+ }
+ if (r_prop_empty_buckets) {
+ *r_prop_empty_buckets = (double)sum_empty / (double)gh->nbuckets;
+ }
+ return ((double)sum * (double)gh->nbuckets /
+ ((double)gh->nentries * (gh->nentries + 2 * gh->nbuckets - 1)));
+ }
}
double BLI_gset_calc_quality_ex(
GSet *gs, double *r_load, double *r_variance,