diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-06-16 17:16:56 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-06-16 17:17:47 +0300 |
commit | f721308bd0893326c784dc2c2b084521ca3c38b8 (patch) | |
tree | 1aad8a760c42481c584b134ab11df0c4200ef367 /source/blender | |
parent | 2c2fd9f0368870678a4c0eeb71d030a3899266d7 (diff) |
Fix bitscan_reverse_uint on MSVC compiler
Was a mistake from the very beginning of implementation.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenlib/intern/math_bits_inline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_bits_inline.c b/source/blender/blenlib/intern/math_bits_inline.c index 8f8f257f1e7..e7a7b17e1e4 100644 --- a/source/blender/blenlib/intern/math_bits_inline.c +++ b/source/blender/blenlib/intern/math_bits_inline.c @@ -63,7 +63,7 @@ MINLINE unsigned int bitscan_reverse_uint(unsigned int a) #ifdef _MSC_VER unsigned long clz; _BitScanReverse(&clz, a); - return clz; + return 31 - clz; #else return (unsigned int)__builtin_clz(a); #endif |