Skip to content

Commit

Permalink
Hopefully fixed a windows build issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
petebunting committed Jun 13, 2024
1 parent e5afe7c commit f1935e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/common/rsgis-tqdm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -216,4 +216,3 @@ namespace rsgis {

}
}//rsgis

4 changes: 3 additions & 1 deletion src/common/rsgis-tqdm.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifndef RSGIS_TQDM_H
#define RSGIS_TQDM_H

#define NOMINMAX

#if _MSC_VER
#include <io.h>
#define isatty _isatty
Expand Down Expand Up @@ -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 = "";
Expand Down

0 comments on commit f1935e0

Please sign in to comment.