diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:16:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 05:17:30 +0300 |
commit | 9ba948a4859da3308033fa6dc54f74433d7e6a21 (patch) | |
tree | 0bd6e95eb59d9af03aa32d925c68e1cbebecc246 /source/blender/blenlib/intern/edgehash.c | |
parent | 337eb8c1de4c57c34520b467d79779153335eecb (diff) |
Cleanup: style, use braces for blenlib
Diffstat (limited to 'source/blender/blenlib/intern/edgehash.c')
-rw-r--r-- | source/blender/blenlib/intern/edgehash.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c index f3d69bc9795..55c9a189a20 100644 --- a/source/blender/blenlib/intern/edgehash.c +++ b/source/blender/blenlib/intern/edgehash.c @@ -113,7 +113,9 @@ BLI_INLINE bool edges_equal(Edge e1, Edge e2) static uint calc_capacity_exp_for_reserve(uint reserve) { uint result = 1; - while (reserve >>= 1) result++; + while (reserve >>= 1) { + result++; + } return result; } @@ -255,7 +257,9 @@ void BLI_edgehash_print(EdgeHash *eh) } printf(" Entries:\n"); for (uint i = 0; i < ENTRIES_CAPACITY(eh); i++) { - if (i == eh->length) printf(" **** below is rest capacity ****\n"); + if (i == eh->length) { + printf(" **** below is rest capacity ****\n"); + } EdgeHashEntry entry = eh->entries[i]; printf(" %u: (%u, %u) -> %p\n", i, entry.edge.v_low, entry.edge.v_high, entry.value); @@ -374,7 +378,9 @@ bool BLI_edgehash_remove(EdgeHash *eh, uint v0, uint v1, EdgeHashFreeFP free_val { uint old_length = eh->length; void *value = BLI_edgehash_popkey(eh, v0, v1); - if (free_value && value) free_value(value); + if (free_value && value) { + free_value(value); + } return old_length > eh->length; } |