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:
Diffstat (limited to 'source/blender/blenlib/intern/hash_mm3.c')
-rw-r--r--source/blender/blenlib/intern/hash_mm3.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenlib/intern/hash_mm3.c b/source/blender/blenlib/intern/hash_mm3.c
index 5ead9ceca63..105c1f46832 100644
--- a/source/blender/blenlib/intern/hash_mm3.c
+++ b/source/blender/blenlib/intern/hash_mm3.c
@@ -92,7 +92,7 @@ BLI_INLINE uint64_t fmix64(uint64_t k)
uint32_t BLI_hash_mm3(const unsigned char *in, size_t len, uint32_t seed)
{
- const uint8_t *data = (const uint8_t*)in;
+ const uint8_t *data = (const uint8_t *)in;
const int nblocks = len / 4;
uint32_t h1 = seed;
@@ -102,23 +102,23 @@ uint32_t BLI_hash_mm3(const unsigned char *in, size_t len, uint32_t seed)
/* body */
- const uint32_t *blocks = (const uint32_t *)(data + nblocks*4);
+ const uint32_t *blocks = (const uint32_t *)(data + nblocks * 4);
for (int i = -nblocks; i; i++) {
- uint32_t k1 = getblock32(blocks,i);
+ uint32_t k1 = getblock32(blocks, i);
k1 *= c1;
- k1 = ROTL32(k1,15);
+ k1 = ROTL32(k1, 15);
k1 *= c2;
h1 ^= k1;
- h1 = ROTL32(h1,13);
- h1 = h1*5+0xe6546b64;
+ h1 = ROTL32(h1, 13);
+ h1 = h1 * 5 + 0xe6546b64;
}
/* tail */
- const uint8_t *tail = (const uint8_t*)(data + nblocks*4);
+ const uint8_t *tail = (const uint8_t *)(data + nblocks * 4);
uint32_t k1 = 0;
@@ -132,10 +132,10 @@ uint32_t BLI_hash_mm3(const unsigned char *in, size_t len, uint32_t seed)
case 1:
k1 ^= tail[0];
k1 *= c1;
- k1 = ROTL32(k1,15);
+ k1 = ROTL32(k1, 15);
k1 *= c2;
h1 ^= k1;
- };
+ }
/* finalization */