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/streams.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/streams.h')
| -rw-r--r-- | src/streams.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/streams.h b/src/streams.h index dc20f7a9d..d5565fe61 100644 --- a/src/streams.h +++ b/src/streams.h @@ -761,7 +761,7 @@ protected: public: CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) : - nType(nTypeIn), nVersion(nVersionIn), nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0) + nType(nTypeIn), nVersion(nVersionIn), nSrcPos(0), nReadPos(0), nReadLimit(std::numeric_limits<uint64_t>::max()), nRewind(nRewindIn), vchBuf(nBufSize, 0) { src = fileIn; } @@ -846,7 +846,7 @@ public: // prevent reading beyond a certain position // no argument removes the limit - bool SetLimit(uint64_t nPos = (uint64_t)(-1)) { + bool SetLimit(uint64_t nPos = std::numeric_limits<uint64_t>::max()) { if (nPos < nReadPos) return false; nReadLimit = nPos; |