diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-29 08:52:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-29 09:51:12 +0300 |
commit | 472599402fcf1bc702afcf7729632d1a56770591 (patch) | |
tree | e6d10442d7bb95ccbccf06ba7f33cefa53aa9c31 /source/blender/blenlib/intern/edgehash.c | |
parent | 37801588d4b9d919bab40f1fa22d631d31eb2105 (diff) |
Cleanup: ghash/edgehash style
Call functions on own lines (nicer for debugging)
Diffstat (limited to 'source/blender/blenlib/intern/edgehash.c')
-rw-r--r-- | source/blender/blenlib/intern/edgehash.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c index cde4a8bf59d..02b11e7b8ee 100644 --- a/source/blender/blenlib/intern/edgehash.c +++ b/source/blender/blenlib/intern/edgehash.c @@ -283,8 +283,10 @@ BLI_INLINE void edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, /** * Remove the entry and return it, caller must free from eh->epool. */ -static EdgeEntry *edgehash_remove_ex(EdgeHash *eh, unsigned int v0, unsigned int v1, EdgeHashFreeFP valfreefp, - unsigned int hash) +static EdgeEntry *edgehash_remove_ex( + EdgeHash *eh, unsigned int v0, unsigned int v1, + EdgeHashFreeFP valfreefp, + unsigned int hash) { EdgeEntry *e; EdgeEntry *e_prev = NULL; @@ -295,10 +297,16 @@ static EdgeEntry *edgehash_remove_ex(EdgeHash *eh, unsigned int v0, unsigned int if (UNLIKELY(v0 == e->v0 && v1 == e->v1)) { EdgeEntry *e_next = e->next; - if (valfreefp) valfreefp(e->val); + if (valfreefp) { + valfreefp(e->val); + } - if (e_prev) e_prev->next = e_next; - else eh->buckets[hash] = e_next; + if (e_prev) { + e_prev->next = e_next; + } + else { + eh->buckets[hash] = e_next; + } eh->nentries--; return e; |