Fix width of integer literal in Scale definition (#52)

Previously the literal was of type `unsigned long long`.
This uses a macro from the fixed-width literal API to give the literal a type of `uintmax_t`.
pull/53/head
Pharap 7 years ago committed by GitHub
parent 529692d81c
commit 4d3f82c3ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/FixedPoints/SFixed.h
  2. 2
      src/FixedPoints/UFixed.h

@ -41,7 +41,7 @@ public:
constexpr const static uintmax_t LogicalSize = IntegerSize + FractionSize;
constexpr const static uintmax_t InternalSize = FIXED_POINTS_DETAILS::BitSize<InternalType>::Value;
constexpr const static uintmax_t Scale = 1ULL << FractionSize;
constexpr const static uintmax_t Scale = UINTMAX_C(1) << FractionSize;
public:
constexpr const static ShiftType IntegerShift = FractionSize;

@ -41,7 +41,7 @@ public:
constexpr const static uintmax_t LogicalSize = IntegerSize + FractionSize;
constexpr const static uintmax_t InternalSize = FIXED_POINTS_DETAILS::BitSize<InternalType>::Value;
constexpr const static uintmax_t Scale = 1ULL << FractionSize;
constexpr const static uintmax_t Scale = UINTMAX_C(1) << FractionSize;
public:
constexpr const static ShiftType IntegerShift = FractionSize;

Loading…
Cancel
Save