Fix usages of std::min and std::max to be windows safe (#4887)

This commit is contained in:
Thad House
2022-12-31 12:00:45 -08:00
committed by GitHub
parent c11bd2720f
commit b632b288a3
6 changed files with 9 additions and 9 deletions

View File

@@ -33,8 +33,8 @@ DifferentialDriveVoltageConstraint::MinMaxAcceleration(
auto wheelSpeeds =
m_kinematics.ToWheelSpeeds({speed, 0_mps, speed * curvature});
auto maxWheelSpeed = std::max(wheelSpeeds.left, wheelSpeeds.right);
auto minWheelSpeed = std::min(wheelSpeeds.left, wheelSpeeds.right);
auto maxWheelSpeed = (std::max)(wheelSpeeds.left, wheelSpeeds.right);
auto minWheelSpeed = (std::min)(wheelSpeeds.left, wheelSpeeds.right);
// Calculate maximum/minimum possible accelerations from motor dynamics
// and max/min wheel speeds