diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 10:04:52 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 11:26:27 +0300 |
commit | 891949cbb47143420f4324cb60efc05ef5d70b39 (patch) | |
tree | fe70a45612ae96f9ce1f37378ef5ff035d3127f5 /source/blender/blenlib/intern/hash_mm2a.c | |
parent | c9e35c2ced92082c86f1ecb9ecd16c6230218c7c (diff) |
Cleanup: use 'u' prefixed integer types for brevity & cast style
To use function style cast '(unsigned char)x' can't be replaced by
'unsigned char(x)'.
Diffstat (limited to 'source/blender/blenlib/intern/hash_mm2a.c')
-rw-r--r-- | source/blender/blenlib/intern/hash_mm2a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/hash_mm2a.c b/source/blender/blenlib/intern/hash_mm2a.c index 8411b49ef38..d13c20e4edb 100644 --- a/source/blender/blenlib/intern/hash_mm2a.c +++ b/source/blender/blenlib/intern/hash_mm2a.c @@ -41,7 +41,7 @@ } \ (void)0 -static void mm2a_mix_tail(BLI_HashMurmur2A *mm2, const unsigned char **data, size_t *len) +static void mm2a_mix_tail(BLI_HashMurmur2A *mm2, const uchar **data, size_t *len) { while (*len && ((*len < 4) || mm2->count)) { mm2->tail |= (uint32_t)(**data) << (mm2->count * 8); @@ -66,7 +66,7 @@ void BLI_hash_mm2a_init(BLI_HashMurmur2A *mm2, uint32_t seed) mm2->size = 0; } -void BLI_hash_mm2a_add(BLI_HashMurmur2A *mm2, const unsigned char *data, size_t len) +void BLI_hash_mm2a_add(BLI_HashMurmur2A *mm2, const uchar *data, size_t len) { mm2->size += (uint32_t)len; @@ -83,7 +83,7 @@ void BLI_hash_mm2a_add(BLI_HashMurmur2A *mm2, const unsigned char *data, size_t void BLI_hash_mm2a_add_int(BLI_HashMurmur2A *mm2, int data) { - BLI_hash_mm2a_add(mm2, (const unsigned char *)&data, sizeof(data)); + BLI_hash_mm2a_add(mm2, (const uchar *)&data, sizeof(data)); } uint32_t BLI_hash_mm2a_end(BLI_HashMurmur2A *mm2) @@ -96,7 +96,7 @@ uint32_t BLI_hash_mm2a_end(BLI_HashMurmur2A *mm2) return mm2->hash; } -uint32_t BLI_hash_mm2(const unsigned char *data, size_t len, uint32_t seed) +uint32_t BLI_hash_mm2(const uchar *data, size_t len, uint32_t seed) { /* Initialize the hash to a 'random' value */ uint32_t h = seed ^ len; |