Module: vkd3d Branch: master Commit: ab3aa96e1fc1a75b2b1f202030adb85380ee348d URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=ab3aa96e1fc1a75b2b1f2020... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jan 28 16:49:57 2022 +0100 vkd3d: Always use _BitScanReverse on Windows. Use ULONG instead of unsigned long for non-Mingw msvcrt builds. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- include/private/vkd3d_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index b7ce9ae..d22c26c 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -88,10 +88,10 @@ static inline bool vkd3d_bitmask_is_contiguous(unsigned int mask) /* Undefined for x == 0. */ static inline unsigned int vkd3d_log2i(unsigned int x) { -#ifdef _MSC_VER +#ifdef _WIN32 /* _BitScanReverse returns the index of the highest set bit, * unlike clz which is 31 - index. */ - unsigned long result; + ULONG result; _BitScanReverse(&result, x); return (unsigned int)result; #elif defined(HAVE_BUILTIN_CLZ)