mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 19:55:46 +00:00
decoders: Use 2's complement instead of unary -
Resolves C4146 on MSVC
This commit is contained in:
parent
ea5b59b539
commit
e9aa1821e8
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ constexpr u32 pdep(u32 value) {
|
|||
u32 m = mask;
|
||||
for (u32 bit = 1; m; bit += bit) {
|
||||
if (value & bit)
|
||||
result |= m & -m;
|
||||
result |= m & (~m + 1);
|
||||
m &= m - 1;
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue