From 70ccc6c6902163bf4ea19eb7427c8edf2e826d77 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 8 Dec 2014 13:09:32 -0800 Subject: [PATCH] More uint fixes. --- src/libqof/qof/gnc-int128.hpp | 18 +++++++++--------- src/libqof/qof/gnc-rational.cpp | 4 ++-- src/libqof/qof/gnc-rational.hpp | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/libqof/qof/gnc-int128.hpp b/src/libqof/qof/gnc-int128.hpp index 0cfab84103..da7f2b474d 100644 --- a/src/libqof/qof/gnc-int128.hpp +++ b/src/libqof/qof/gnc-int128.hpp @@ -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; diff --git a/src/libqof/qof/gnc-rational.cpp b/src/libqof/qof/gnc-rational.cpp index 30e5cf49fd..28a343f2e5 100644 --- a/src/libqof/qof/gnc-rational.cpp +++ b/src/libqof/qof/gnc-rational.cpp @@ -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(how & GNC_NUMERIC_RND_MASK)), m_type (static_cast(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; diff --git a/src/libqof/qof/gnc-rational.hpp b/src/libqof/qof/gnc-rational.hpp index 0457c213c1..a7db8e41cb 100644 --- a/src/libqof/qof/gnc-rational.hpp +++ b/src/libqof/qof/gnc-rational.hpp @@ -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; };