- fix error with shadow's driver on visual 2017

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7672 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: 0260b0df382c2112782ee85a64de2b2d875a63d4
Former-commit-id: 3d60769bfd6d58d1663ad93a42194fea66b9076a
This commit is contained in:
torcs-ng 2021-09-18 18:27:37 +00:00
parent 136683ee12
commit c7a94c59cb
2 changed files with 2 additions and 2 deletions

View file

@ -422,7 +422,7 @@ double Strategy::calcRefuel(CarElt* pCar) const
int tirespitstops = int(floor(disttoend / tiresstintdist));
// Need fuel or tires stops?
int pitstops = std::max(fuelpitstops, tirespitstops);
int pitstops = MX(fuelpitstops, tirespitstops);
// Calc the stint fuel
double stintfuel = fueltoend / (pitstops + 1) +2.0;

View file

@ -107,7 +107,7 @@ namespace Util2s
// Clip VALUE to the range LOW--HIGH.
template <typename T> T clip(T value, T low, T high)
{
return std::max(std::min(value, high), low);
return MX(MN(value, high), low);
}
}