Fix compile error building macOS-latest: changed MINIMUM_TIME_REMAINING from const to constexpr in CharacterController::playerStep.

Error was: "static_assert expression is not an integral constant expression", "read of non-constexpr variable 'MINIMUM_TIME_REMAINING' is not allowed in a constant expression".
Error started in last commit (2179c153de).
This commit is contained in:
Phil Palmer 2020-12-22 15:51:03 -05:00
parent 2179c153de
commit 6fc40385ca

View file

@ -350,7 +350,7 @@ void CharacterController::playerStep(btCollisionWorld* collisionWorld, btScalar
btVector3 velocity = _rigidBody->getLinearVelocity() - _parentVelocity;
computeNewVelocity(dt, velocity);
const float MINIMUM_TIME_REMAINING = 0.005f;
constexpr float MINIMUM_TIME_REMAINING = 0.005f;
static_assert(FOLLOW_TIME_IMMEDIATE_SNAP > MINIMUM_TIME_REMAINING, "The code below assumes this condition is true.");
bool hasFollowTimeRemaining = false;