Skip to content

Commit 0b11343

Browse files
committed
Moved commit "Decimal: win32 compile fix" from ydb repo
1 parent a101b1c commit 0b11343

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/library/yql_common/decimal/yql_decimal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ namespace NDecimal {
1717
#endif
1818

1919
#ifdef DONT_USE_NATIVE_INT128
20-
using TInt128 = TWide<i64>;
21-
using TUint128 = TWide<ui64>;
20+
using TInt128 = TWide<int64_t>;
21+
using TUint128 = TWide<uint64_t>;
2222
#else
2323
using TInt128 = signed __int128;
2424
using TUint128 = unsigned __int128;
@@ -313,10 +313,10 @@ class TDecimalRemainder {
313313

314314
TInt128 Do(TInt128 left, TRight right) const {
315315
if constexpr (std::is_signed<TRight>::value) {
316-
if (right >= +Bound || right <= -Bound)
316+
if (TInt128(right) >= +Bound || TInt128(right) <= -Bound)
317317
return left;
318318
} else {
319-
if (right >= Bound)
319+
if (TInt128(right) >= Bound)
320320
return left;
321321
}
322322

0 commit comments

Comments
 (0)