Skip to content

Commit 529692d

Browse files
authored
Change member constants to uintmax_t (#51)
This makes the typing of `SFixed`'s constants match the typing of `UFixed`'s constants.
1 parent 6054d11 commit 529692d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/FixedPoints/SFixed.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class SFixed
3636
using ShiftType = FIXED_POINTS_DETAILS::LeastUInt<(Integer + 1) + Fraction>;
3737
using MaskType = FIXED_POINTS_DETAILS::LeastUInt<(Integer + 1) + Fraction>;
3838

39-
constexpr const static unsigned IntegerSize = Integer + 1;
40-
constexpr const static unsigned FractionSize = Fraction;
41-
constexpr const static unsigned LogicalSize = IntegerSize + FractionSize;
42-
constexpr const static unsigned InternalSize = FIXED_POINTS_DETAILS::BitSize<InternalType>::Value;
39+
constexpr const static uintmax_t IntegerSize = Integer + 1;
40+
constexpr const static uintmax_t FractionSize = Fraction;
41+
constexpr const static uintmax_t LogicalSize = IntegerSize + FractionSize;
42+
constexpr const static uintmax_t InternalSize = FIXED_POINTS_DETAILS::BitSize<InternalType>::Value;
4343

44-
constexpr const static unsigned long long Scale = 1ULL << FractionSize;
44+
constexpr const static uintmax_t Scale = 1ULL << FractionSize;
4545

4646
public:
4747
constexpr const static ShiftType IntegerShift = FractionSize;

0 commit comments

Comments
 (0)