diff --git a/ciphers/uint256_t.hpp b/ciphers/uint256_t.hpp index 3c7b75d25..04d96b574 100644 --- a/ciphers/uint256_t.hpp +++ b/ciphers/uint256_t.hpp @@ -197,7 +197,7 @@ class uint256_t { * @returns addition of this and p, returning uint256_t integer */ inline uint256_t operator+(const uint256_t &p) { - bool app = s + p.s < s; + uint32_t app = (s + p.s < s); return {f + app + p.f, p.s + s}; } @@ -210,7 +210,7 @@ class uint256_t { template ::value, T>::type> inline uint256_t &operator+=(const T &p) { - bool app = p + s < s; + uint32_t app = (p + s < s); this->f += app; this->s += p; return *this; @@ -222,7 +222,7 @@ class uint256_t { * @returns addition of this and p, returning this */ inline uint256_t &operator+=(const uint256_t &p) { - bool _app = (p.s + s < s); + uint32_t _app = (p.s + s < s); f += _app + p.f; s += p.s; return *this; @@ -255,7 +255,7 @@ class uint256_t { template ::value, T>::type> inline uint256_t operator-(const T &p) { - bool app = p > s; + uint32_t app = (p > s); return uint256_t(f - app, s - p); } @@ -265,7 +265,7 @@ class uint256_t { * @returns subtraction of this and p, returning uint256_t integer */ inline uint256_t operator-(const uint256_t &p) { - bool app = p.s > s; + uint32_t app = p.s > s; return {f - p.f - app, s - p.s}; } @@ -302,7 +302,7 @@ class uint256_t { template ::value, T>::type> inline uint256_t operator-=(const T p) { - bool app = p > s; + uint32_t app = (p > s); f -= app; s -= p; return *this; @@ -314,7 +314,7 @@ class uint256_t { * @returns subtraction of this and p, returning this */ inline uint256_t &operator-=(const uint256_t &p) { - bool app = p.s > s; + uint32_t app = p.s > s; f = f - app - p.f; s -= p.s; return *this;