input/InputStream: define UNKNOWN_SIZE without undefined behavior

This commit is contained in:
Max Kellermann 2019-05-22 12:01:46 +02:00
parent 4b78038b41
commit c1b853ca7c

View File

@ -76,7 +76,7 @@ protected:
*/
bool seekable = false;
static constexpr offset_type UNKNOWN_SIZE = -1;
static constexpr offset_type UNKNOWN_SIZE = ~offset_type(0);
/**
* the size of the resource, or #UNKNOWN_SIZE if unknown