[*] Stupid msvc bug or am I stupid?

This commit is contained in:
Reece Wilson 2022-08-11 23:31:24 +01:00
parent f81f99f45e
commit c43bf9e1cd

View File

@ -36,6 +36,7 @@ static auline bool AuBitScanForward(AuUInt8 &index, T value)
#if defined(AURORA_COMPILER_MSVC)
if constexpr (sizeof(T) == sizeof(AuUInt64))
{
#if defined(AURORA_IS_32BIT)
if (!_BitScanForward(&ret, static_cast<AuUInt32>(value & 0xffffffff)))
{
@ -48,7 +49,11 @@ static auline bool AuBitScanForward(AuUInt8 &index, T value)
#else
success = _BitScanForward64(&ret, static_cast<AuUInt64>(value));
#endif
else success = _BitScanForward(&ret, static_cast<unsigned long>(value));
}
else
{
success = _BitScanForward(&ret, static_cast<unsigned long>(value));
}
#elif defined(AURORA_COMPILER_GCC) || defined(AURORA_COMPILER_CLANG)
if (value == 0)
{