diff --git a/src/common/rsgis-tqdm.cpp b/src/common/rsgis-tqdm.cpp index d8236352..d0e06d00 100644 --- a/src/common/rsgis-tqdm.cpp +++ b/src/common/rsgis-tqdm.cpp @@ -131,7 +131,7 @@ namespace rsgis { // and slowing down the loop, shoot for ~25Hz and smooth over 3 seconds if (nupdates > 10) { - period = (int)( std::min(std::max((1.0/25)*curr/dt_tot,1.0), 5e5)); + period = (int)( (std::min)((std::max)((1.0/25)*curr/dt_tot,1.0), 5e5)); smoothing = 25*3; } double peta = (tot-curr)/avgrate; @@ -216,4 +216,3 @@ namespace rsgis { } }//rsgis - diff --git a/src/common/rsgis-tqdm.h b/src/common/rsgis-tqdm.h index e22f9e45..2cbf3578 100644 --- a/src/common/rsgis-tqdm.h +++ b/src/common/rsgis-tqdm.h @@ -11,6 +11,8 @@ #ifndef RSGIS_TQDM_H #define RSGIS_TQDM_H +#define NOMINMAX + #if _MSC_VER #include #define isatty _isatty @@ -100,7 +102,7 @@ namespace rsgis #endif // return the space left for process bar // '60' is an experience value to exclude other output info, such as percent, time elapsed, etc. - return std::max((int)width - 60, 1); + return (std::max)((int)width - 60, 1); }(); std::string right_pad = "▏";