diff --git a/include/imageinfo.hpp b/include/imageinfo.hpp index 2049de4..44c0897 100644 --- a/include/imageinfo.hpp +++ b/include/imageinfo.hpp @@ -310,7 +310,7 @@ class ReadInterface { ReadInterface(ReadFunc &read_func, size_t length) : read_func_(read_func), length_(length) { #ifndef II_DISABLE_HEADER_CACHE - header_cache_.alloc(std::min((size_t)II_HEADER_CACHE_SIZE, length)); + header_cache_.alloc((std::min)((size_t)II_HEADER_CACHE_SIZE, length)); read(header_cache_.data(), 0, header_cache_.size()); #endif } @@ -737,7 +737,7 @@ bool try_icns(ReadInterface &ri, size_t length, ImageInfo &info) { uint32_t entry_size = buffer.read_u32_be(4); int64_t s = size_map.at(type); entry_sizes.emplace_back(s, s); - max_size = std::max(max_size, s); + max_size = (std::max)(max_size, s); offset += entry_size; }