Silence a compiler warning in serialise.hh

Explicitely cast to `uint64_t` in `readNum` to avoid a "comparison
between signed and unsigned" warning
This commit is contained in:
regnat 2020-09-22 10:37:43 +02:00
parent ecc8672aa0
commit c1e79f870c

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;