mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
More uint fixes.
This commit is contained in:
parent
0b1842cee1
commit
70ccc6c690
@ -57,9 +57,9 @@ class GncInt128
|
||||
uint64_t m_lo;
|
||||
|
||||
public:
|
||||
static const uint numlegs = 2;
|
||||
static const uint legbits = 64;
|
||||
static const uint maxbits = legbits * numlegs;
|
||||
static const unsigned int numlegs = 2;
|
||||
static const unsigned int legbits = 64;
|
||||
static const unsigned int maxbits = legbits * numlegs;
|
||||
|
||||
enum // Values for m_flags
|
||||
{
|
||||
@ -135,7 +135,7 @@ enum // Values for m_flags
|
||||
* value greater than 128 would overflow on any value other than 1.
|
||||
* @return A GncInt128
|
||||
*/
|
||||
GncInt128 pow (uint n) const noexcept;
|
||||
GncInt128 pow (unsigned int n) const noexcept;
|
||||
|
||||
/**
|
||||
* Computes a quotient and a remainder, passed as reference parameters.
|
||||
@ -190,7 +190,7 @@ enum // Values for m_flags
|
||||
/**
|
||||
* @return the number of bits used to represent the value
|
||||
*/
|
||||
uint bits() const noexcept;
|
||||
unsigned int bits() const noexcept;
|
||||
|
||||
/**
|
||||
* Fills a supplied buffer with a representation of the number in base 10. If
|
||||
@ -211,8 +211,8 @@ enum // Values for m_flags
|
||||
GncInt128& operator++ (int) noexcept;
|
||||
GncInt128& operator-- () noexcept;
|
||||
GncInt128& operator-- (int) noexcept;
|
||||
GncInt128& operator<<= (uint i) noexcept;
|
||||
GncInt128& operator>>= (uint i) noexcept;
|
||||
GncInt128& operator<<= (unsigned int i) noexcept;
|
||||
GncInt128& operator>>= (unsigned int i) noexcept;
|
||||
GncInt128& operator+= (const GncInt128& b) noexcept;
|
||||
GncInt128& operator-= (const GncInt128& b) noexcept;
|
||||
GncInt128& operator*= (const GncInt128& b) noexcept;
|
||||
@ -235,8 +235,8 @@ GncInt128 operator% (GncInt128 a, const GncInt128& b) noexcept;
|
||||
GncInt128 operator& (GncInt128 a, const GncInt128& b) noexcept;
|
||||
GncInt128 operator| (GncInt128 a, const GncInt128& b) noexcept;
|
||||
GncInt128 operator^ (GncInt128 a, const GncInt128& b) noexcept;
|
||||
GncInt128 operator<< (GncInt128 a, uint b) noexcept;
|
||||
GncInt128 operator>> (GncInt128 a, uint b) noexcept;
|
||||
GncInt128 operator<< (GncInt128 a, unsigned int b) noexcept;
|
||||
GncInt128 operator>> (GncInt128 a, unsigned int b) noexcept;
|
||||
|
||||
bool operator== (const GncInt128& a, const GncInt128& b) noexcept;
|
||||
bool operator!= (const GncInt128& a, const GncInt128& b) noexcept;
|
||||
|
@ -272,7 +272,7 @@ GncRational::round (GncDenom& denom) noexcept
|
||||
}
|
||||
|
||||
GncDenom::GncDenom (GncRational& a, GncRational& b,
|
||||
int64_t spec, uint how) noexcept :
|
||||
int64_t spec, unsigned int how) noexcept :
|
||||
m_value (spec),
|
||||
m_round (static_cast<GncDenom::RoundType>(how & GNC_NUMERIC_RND_MASK)),
|
||||
m_type (static_cast<GncDenom::DenomType>(how & GNC_NUMERIC_DENOM_MASK)),
|
||||
@ -337,7 +337,7 @@ GncDenom::reduce (const GncRational& a) noexcept
|
||||
val = a.m_num.abs() / a.m_den;
|
||||
else
|
||||
val = a.m_den / a.m_num.abs();
|
||||
uint digits {};
|
||||
unsigned int digits {};
|
||||
while (val >= 10)
|
||||
{
|
||||
++digits;
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
|
||||
struct GncDenom
|
||||
{
|
||||
GncDenom (GncRational& a, GncRational& b, int64_t spec, uint how) noexcept;
|
||||
GncDenom (GncRational& a, GncRational& b, int64_t spec, unsigned int how) noexcept;
|
||||
void reduce (const GncRational& a) noexcept;
|
||||
GncInt128 get () const noexcept { return m_value; }
|
||||
|
||||
@ -81,7 +81,7 @@ struct GncDenom
|
||||
RoundType m_round;
|
||||
DenomType m_type;
|
||||
bool m_auto;
|
||||
uint m_sigfigs;
|
||||
unsigned int m_sigfigs;
|
||||
GNCNumericErrorCode m_error;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user