diff options
Diffstat (limited to 'source/blender/blenfont/intern/blf_util.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_util.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/source/blender/blenfont/intern/blf_util.c b/source/blender/blenfont/intern/blf_util.c index d479861b897..e55759199a2 100644 --- a/source/blender/blenfont/intern/blf_util.c +++ b/source/blender/blenfont/intern/blf_util.c @@ -23,7 +23,6 @@ * Internal utility API for BLF. */ - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -34,26 +33,26 @@ unsigned int blf_next_p2(unsigned int x) { - x -= 1; - x |= (x >> 16); - x |= (x >> 8); - x |= (x >> 4); - x |= (x >> 2); - x |= (x >> 1); - x += 1; - return x; + x -= 1; + x |= (x >> 16); + x |= (x >> 8); + x |= (x >> 4); + x |= (x >> 2); + x |= (x >> 1); + x += 1; + return x; } unsigned int blf_hash(unsigned int val) { - unsigned int key; - - key = val; - key += ~(key << 16); - key ^= (key >> 5); - key += (key << 3); - key ^= (key >> 13); - key += ~(key << 9); - key ^= (key >> 17); - return key % 257; + unsigned int key; + + key = val; + key += ~(key << 16); + key ^= (key >> 5); + key += (key << 3); + key ^= (key >> 13); + key += ~(key << 9); + key ^= (key >> 17); + return key % 257; } |