mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-23 19:25:49 +01:00
decoders: Use 2's complement instead of unary -
Resolves C4146 on MSVC
This commit is contained in:
parent
f3c40f4a20
commit
bad3025951
@ -21,7 +21,7 @@ constexpr u32 pdep(u32 value) {
|
|||||||
u32 m = mask;
|
u32 m = mask;
|
||||||
for (u32 bit = 1; m; bit += bit) {
|
for (u32 bit = 1; m; bit += bit) {
|
||||||
if (value & bit)
|
if (value & bit)
|
||||||
result |= m & -m;
|
result |= m & (~m + 1);
|
||||||
m &= m - 1;
|
m &= m - 1;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user