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:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-06-16 17:16:56 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-06-16 17:17:47 +0300
commitf721308bd0893326c784dc2c2b084521ca3c38b8 (patch)
tree1aad8a760c42481c584b134ab11df0c4200ef367
parent2c2fd9f0368870678a4c0eeb71d030a3899266d7 (diff)
Fix bitscan_reverse_uint on MSVC compiler
Was a mistake from the very beginning of implementation.
-rw-r--r--source/blender/blenlib/intern/math_bits_inline.c2
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