mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-19 20:32:15 +02:00
obs-outputs: Use _CountTrailingZeros() in ctz32
This change modifies the `ctz32` function to use `_CountTrailingZeros` when `_M_ARM64` is defined, as `_tzcnt_u32` is not available on WOA.
This commit is contained in:
parent
29b8379ab4
commit
ac0911da81
@ -22,7 +22,11 @@ static inline uint32_t clz32(unsigned long val)
|
||||
|
||||
static inline uint32_t ctz32(unsigned long val)
|
||||
{
|
||||
#if defined(_M_ARM64)
|
||||
return _CountTrailingZeros(val);
|
||||
#else
|
||||
return _tzcnt_u32(val);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
static uint32_t popcnt(uint32_t x)
|
||||
|
Loading…
Reference in New Issue
Block a user