Cleanup: style

This commit is contained in:
2017-04-24 21:58:28 +10:00
parent 50bfaffc6b
commit aff30aaf2d
15 changed files with 37 additions and 34 deletions

View File

@@ -27,7 +27,7 @@
BLI_INLINE unsigned int BLI_hash_int_2d(unsigned int kx, unsigned int ky)
{
#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
#define rot(x, k) (((x) << (k)) | ((x) >> (32 - (k))))
unsigned int a, b, c;
@@ -35,13 +35,13 @@ BLI_INLINE unsigned int BLI_hash_int_2d(unsigned int kx, unsigned int ky)
a += kx;
b += ky;
c ^= b; c -= rot(b,14);
a ^= c; a -= rot(c,11);
b ^= a; b -= rot(a,25);
c ^= b; c -= rot(b,16);
a ^= c; a -= rot(c,4);
b ^= a; b -= rot(a,14);
c ^= b; c -= rot(b,24);
c ^= b; c -= rot(b, 14);
a ^= c; a -= rot(c, 11);
b ^= a; b -= rot(a, 25);
c ^= b; c -= rot(b, 16);
a ^= c; a -= rot(c, 4);
b ^= a; b -= rot(a, 14);
c ^= b; c -= rot(b, 24);
return c;
@@ -52,9 +52,9 @@ BLI_INLINE unsigned int BLI_hash_string(const char *str)
{
unsigned int i = 0, c;
while((c = *str++))
while ((c = *str++)) {
i = i * 37 + c;
}
return i;
}