Merge pull request #4049 from tweag/remove-signed-unsigned-warning

Silence a compiler warning in serialise.hh
This commit is contained in:
Eelco Dolstra 2020-09-22 11:05:24 +02:00 committed by GitHub
commit 451567d259
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -340,7 +340,7 @@ T readNum(Source & source)
((uint64_t) buf[6] << 48) |
((uint64_t) buf[7] << 56);
if (n > std::numeric_limits<T>::max())
if (n > (uint64_t)std::numeric_limits<T>::max())
throw SerialisationError("serialised integer %d is too large for type '%s'", n, typeid(T).name());
return (T) n;