diff options
author | Ton Roosendaal <ton@blender.org> | 2008-09-20 16:26:18 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-09-20 16:26:18 +0400 |
commit | 9b9edad6b6fb4db3f393ef408921f8411b588814 (patch) | |
tree | b91286f79f9ccb05472029f6e94bbeee6c7b10fb /source/blender/blenlib/intern | |
parent | 3dbdd8939b418d39f42b6cc0b4fab38083b393cd (diff) |
Patch 17403, small gcc warning fixes.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/edgehash.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/blenlib/intern/edgehash.c b/source/blender/blenlib/intern/edgehash.c index 3e1c8afb7a8..603c85655d7 100644 --- a/source/blender/blenlib/intern/edgehash.c +++ b/source/blender/blenlib/intern/edgehash.c @@ -77,8 +77,12 @@ void BLI_edgehash_insert(EdgeHash *eh, int v0, int v1, void *val) { unsigned int hash; Entry *e= malloc(sizeof(*e)); - if (v1<v0) v0 ^= v1 ^= v0 ^= v1; - hash = EDGEHASH(v0,v1)%eh->nbuckets; + if (v1<v0) { + v0 ^= v1; + v1 ^= v0; + v0 ^= v1; + } + hash = EDGEHASH(v0,v1)%eh->nbuckets; e->v0 = v0; e->v1 = v1; @@ -114,7 +118,11 @@ void** BLI_edgehash_lookup_p(EdgeHash *eh, int v0, int v1) { unsigned int hash; Entry *e; - if (v1<v0) v0 ^= v1 ^= v0 ^= v1; + if (v1<v0) { + v0 ^= v1; + v1 ^= v0; + v0 ^= v1; + } hash = EDGEHASH(v0,v1)%eh->nbuckets; for (e= eh->buckets[hash]; e; e= e->next) if (v0==e->v0 && v1==e->v1) |