diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-12-04 13:16:30 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2018-12-04 19:55:04 +0200 |
commit | cf4b0327ed92ca8a1533cdf6c2b0015fd9b56397 (patch) | |
tree | 1ac306ee221382b3ec917a0fba640382a8fcb1d2 /src/arith_uint256.h | |
parent | 6b82fc59eb19004e54f910261a40d5e1b9e44b42 (diff) |
Use std::numeric_limits<UNSIGNED>::max()) instead of (UNSIGNED)-1
Diffstat (limited to 'src/arith_uint256.h')
-rw-r--r-- | src/arith_uint256.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arith_uint256.h b/src/arith_uint256.h index 5cc273be27..bd0360087d 100644 --- a/src/arith_uint256.h +++ b/src/arith_uint256.h @@ -8,6 +8,7 @@ #include <assert.h> #include <cstring> +#include <limits> #include <stdexcept> #include <stdint.h> #include <string> @@ -189,7 +190,7 @@ public: { // prefix operator int i = 0; - while (i < WIDTH && --pn[i] == (uint32_t)-1) + while (i < WIDTH && --pn[i] == std::numeric_limits<uint32_t>::max()) i++; return *this; } |