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>2014-04-15 08:39:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-15 08:40:33 +0400
commitaa10cf7f5cc3b2acdc0fd79b0eecccae029afcfa (patch)
treebc1b692349a746590eb3ec1cba89a3bfe675e0ab /source/blender/bmesh
parentcad4bfe653e12bb4c6178b7a83d35806d10ee9b0 (diff)
GHash: add BLI_ghashutil_uinthash_v4 for hashing 4 ints at once
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r--source/blender/bmesh/tools/bmesh_beautify.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c
index b19a7d0e9b6..8223a122e2b 100644
--- a/source/blender/bmesh/tools/bmesh_beautify.c
+++ b/source/blender/bmesh/tools/bmesh_beautify.c
@@ -59,16 +59,14 @@ typedef struct EdRotState {
int f1, f2; /* face vert, small -> large */
} EdRotState;
+#if 0
+/* use BLI_ghashutil_inthash_v4 direct */
static unsigned int erot_gsetutil_hash(const void *ptr)
{
const EdRotState *e_state = (const EdRotState *)ptr;
- unsigned int hash;
- hash = BLI_ghashutil_inthash(e_state->v1);
- hash ^= BLI_ghashutil_inthash(e_state->v2);
- hash ^= BLI_ghashutil_inthash(e_state->f1);
- hash ^= BLI_ghashutil_inthash(e_state->f2);
- return hash;
+ return BLI_ghashutil_inthash_v4(&e_state->v1);
}
+#endif
static int erot_gsetutil_cmp(const void *a, const void *b)
{
const EdRotState *e_state_a = (const EdRotState *)a;
@@ -86,7 +84,7 @@ static int erot_gsetutil_cmp(const void *a, const void *b)
static GSet *erot_gset_new(void)
{
- return BLI_gset_new(erot_gsetutil_hash, erot_gsetutil_cmp, __func__);
+ return BLI_gset_new(BLI_ghashutil_inthash_v4_p, erot_gsetutil_cmp, __func__);
}
/* ensure v0 is smaller */