From 529692d81c90f6f6ff74696e7da3896eda71a21e Mon Sep 17 00:00:00 2001 From: Pharap <2933055+Pharap@users.noreply.github.com> Date: Thu, 31 May 2018 19:37:42 +0100 Subject: [PATCH] Change member constants to uintmax_t (#51) This makes the typing of `SFixed`'s constants match the typing of `UFixed`'s constants. --- src/FixedPoints/SFixed.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/FixedPoints/SFixed.h b/src/FixedPoints/SFixed.h index 9bb19b5..f734537 100644 --- a/src/FixedPoints/SFixed.h +++ b/src/FixedPoints/SFixed.h @@ -36,12 +36,12 @@ public: using ShiftType = FIXED_POINTS_DETAILS::LeastUInt<(Integer + 1) + Fraction>; using MaskType = FIXED_POINTS_DETAILS::LeastUInt<(Integer + 1) + Fraction>; - constexpr const static unsigned IntegerSize = Integer + 1; - constexpr const static unsigned FractionSize = Fraction; - constexpr const static unsigned LogicalSize = IntegerSize + FractionSize; - constexpr const static unsigned InternalSize = FIXED_POINTS_DETAILS::BitSize::Value; + constexpr const static uintmax_t IntegerSize = Integer + 1; + constexpr const static uintmax_t FractionSize = Fraction; + constexpr const static uintmax_t LogicalSize = IntegerSize + FractionSize; + constexpr const static uintmax_t InternalSize = FIXED_POINTS_DETAILS::BitSize::Value; - constexpr const static unsigned long long Scale = 1ULL << FractionSize; + constexpr const static uintmax_t Scale = 1ULL << FractionSize; public: constexpr const static ShiftType IntegerShift = FractionSize;