diff options
| author | practicalswift <[email protected]> | 2018-12-04 13:16:30 +0100 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2018-12-04 19:55:04 +0200 |
| commit | cf4b0327ed92ca8a1533cdf6c2b0015fd9b56397 (patch) | |
| tree | 1ac306ee221382b3ec917a0fba640382a8fcb1d2 /src/arith_uint256.h | |
| parent | Use const in COutPoint class (diff) | |
| download | discoin-cf4b0327ed92ca8a1533cdf6c2b0015fd9b56397.tar.xz discoin-cf4b0327ed92ca8a1533cdf6c2b0015fd9b56397.zip | |
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 5cc273be2..bd0360087 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; } |