From 15798e6ebb296fb426294d18c76259d5f2a0035a Mon Sep 17 00:00:00 2001 From: Joshua Hintze Date: Fri, 15 Oct 2021 19:31:45 -0600 Subject: [PATCH] -Fixed issue with VS2017 compiling --- include/mapnik/util/char_array_buffer.hpp | 9 +++++---- src/webp_reader.cpp | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/mapnik/util/char_array_buffer.hpp b/include/mapnik/util/char_array_buffer.hpp index 894aa83b9..67b59f6ed 100644 --- a/include/mapnik/util/char_array_buffer.hpp +++ b/include/mapnik/util/char_array_buffer.hpp @@ -24,6 +24,7 @@ #define MAPNIK_UTIL_CHAR_ARRAY_BUFFER_HPP #include +#include namespace mapnik { namespace util { @@ -71,16 +72,16 @@ private: pos_type seekpos(pos_type off, std::ios_base::openmode /*which*/) { - current_ = std::min(begin_ + off, end_); + current_ = (std::min)(begin_ + off, end_); return pos_type(off_type(current_ - begin_)); } pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out ) { - if (dir == std::ios_base::beg) current_ = std::min(begin_ + off, end_); - else if (dir == std::ios_base::cur) current_ = std::min(current_ + off, end_); - else current_ = std::max(end_ - off, begin_); // dir == std::ios_base::end + if (dir == std::ios_base::beg) current_ = (std::min)(begin_ + off, end_); + else if (dir == std::ios_base::cur) current_ = (std::min)(current_ + off, end_); + else current_ = (std::max)(end_ - off, begin_); // dir == std::ios_base::end return pos_type(off_type(current_ - begin_)); } char const * const begin_; diff --git a/src/webp_reader.cpp b/src/webp_reader.cpp index 8a806d0a1..095d3b004 100644 --- a/src/webp_reader.cpp +++ b/src/webp_reader.cpp @@ -39,6 +39,7 @@ MAPNIK_DISABLE_WARNING_POP // stl #include #include +#include namespace mapnik {