diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-15 08:17:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-15 08:22:36 +0400 |
commit | a7241d09cdd204a63e10a6e53c575f36639a3102 (patch) | |
tree | a436fbac1010ece84d9d15c617d5be3728469133 /source/blender/editors/sculpt_paint/sculpt_uv.c | |
parent | ea610e655cd8b8f9fb97f0a9a4fc5fd46418bd9e (diff) |
GHash: add typed hash functions (were all (void *))
- BLI_ghashutil_strhash_n takes string length, to avoid terminating the string before hashing.
- BLI_ghashutil_inthash/uinthash take ints, to avoid casting to (void *)
This also showed up incorrect use of inthash, which was using a pointer.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_uv.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_uv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index c064612a551..d47840d1504 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -560,8 +560,8 @@ static int uv_element_offset_from_face_get(UvElementMap *map, BMFace *efa, BMLoo static unsigned int uv_edge_hash(const void *key) { UvEdge *edge = (UvEdge *)key; - return (BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv2)) + - BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv1))); + return (BLI_ghashutil_uinthash(edge->uv2) + + BLI_ghashutil_uinthash(edge->uv1)); } static int uv_edge_compare(const void *a, const void *b) |