diff --git a/src/drivers/shadow/src/Strategy.cpp b/src/drivers/shadow/src/Strategy.cpp index ad9458139..b9b04e811 100644 --- a/src/drivers/shadow/src/Strategy.cpp +++ b/src/drivers/shadow/src/Strategy.cpp @@ -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; diff --git a/src/drivers/shadow/src/Utils.h b/src/drivers/shadow/src/Utils.h index 278af3065..2ff037b92 100644 --- a/src/drivers/shadow/src/Utils.h +++ b/src/drivers/shadow/src/Utils.h @@ -107,7 +107,7 @@ namespace Util2s // Clip VALUE to the range LOW--HIGH. template T clip(T value, T low, T high) { - return std::max(std::min(value, high), low); + return MX(MN(value, high), low); } }