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/streams.h | |
parent | 6b82fc59eb19004e54f910261a40d5e1b9e44b42 (diff) |
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 dc20f7a9da..d5565fe61f 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; |