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>2017-04-24 14:58:28 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-24 15:00:46 +0300
commitaff30aaf2dddeb30ae43ec45ff12073a73ffcdc0 (patch)
tree7e2f77b731a2f58b22f3416c9f20c1b1c3fee211 /source/blender/blenlib/BLI_hash.h
parent50bfaffc6b5ea250063825263a4099f9b384edfb (diff)
Cleanup: style
Diffstat (limited to 'source/blender/blenlib/BLI_hash.h')
-rw-r--r--source/blender/blenlib/BLI_hash.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenlib/BLI_hash.h b/source/blender/blenlib/BLI_hash.h
index 50c7a7f9f0f..e849e5f8f61 100644
--- a/source/blender/blenlib/BLI_hash.h
+++ b/source/blender/blenlib/BLI_hash.h
@@ -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;
}