Fix SFixed conversion by making ShiftType signed (#100)

`SFixed`'s conversion operator isn't functioning correctly because the shifting is being done with an unsigned type.
This rectifies that by changing `SFixed`'s `ShiftType` to a signed integer type.
master
Pharap 2 years ago committed by GitHub
parent b61dd1a2c8
commit def0ef29f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/FixedPoints/SFixed.h

@ -44,7 +44,7 @@ public:
static constexpr uintmax_t InternalSize = FIXED_POINTS_DETAILS::BitSize<InternalType>::Value;
using ShiftType = FIXED_POINTS_DETAILS::LeastUInt<LogicalSize>;
using ShiftType = FIXED_POINTS_DETAILS::LeastInt<LogicalSize>;
using MaskType = FIXED_POINTS_DETAILS::LeastUInt<LogicalSize>;
public:

Loading…
Cancel
Save