mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
Common/uint128: Correct MSVC Compilation in old versions.
This commit is contained in:
parent
18f54f7486
commit
59ce6e6d06
1 changed files with 4 additions and 0 deletions
|
@ -19,7 +19,11 @@ u64 MultiplyAndDivide64(u64 a, u64 b, u64 d) {
|
||||||
u128 r{};
|
u128 r{};
|
||||||
r[0] = _umul128(a, b, &r[1]);
|
r[0] = _umul128(a, b, &r[1]);
|
||||||
u64 remainder;
|
u64 remainder;
|
||||||
|
#if _MSC_VER < 1923
|
||||||
|
return udiv128(r[1], r[0], d, &remainder);
|
||||||
|
#else
|
||||||
return _udiv128(r[1], r[0], d, &remainder);
|
return _udiv128(r[1], r[0], d, &remainder);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue