From 93276a901df73e79a180608e3ab6fd5c7d8fde9e Mon Sep 17 00:00:00 2001 From: HifiExperiments Date: Fri, 7 Jun 2024 14:22:02 -0700 Subject: [PATCH] one more warning --- interface/src/avatar/MyAvatar.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/interface/src/avatar/MyAvatar.cpp b/interface/src/avatar/MyAvatar.cpp index 5d3d6f0d1f..85972058da 100644 --- a/interface/src/avatar/MyAvatar.cpp +++ b/interface/src/avatar/MyAvatar.cpp @@ -5768,8 +5768,7 @@ void MyAvatar::FollowHelper::deactivate() { } void MyAvatar::FollowHelper::deactivate(CharacterController::FollowType type) { - int int_type = static_cast(type); - assert(int_type >= 0 && int_type < static_cast(CharacterController::FollowType::Count)); + assert((int)type >= 0 && (int)type < static_cast(CharacterController::FollowType::Count)); _timeRemaining[(int)type] = 0.0f; } @@ -5777,16 +5776,14 @@ void MyAvatar::FollowHelper::deactivate(CharacterController::FollowType type) { // eg. activate(FollowType::Rotation, true) snaps the FollowHelper's rotation immediately // to the rotation of its _followDesiredBodyTransform. void MyAvatar::FollowHelper::activate(CharacterController::FollowType type, const bool snapFollow) { - int int_type = static_cast(type); - assert(int_type >= 0 && int_type < static_cast(CharacterController::FollowType::Count)); + assert((int)type >= 0 && (int)type < static_cast(CharacterController::FollowType::Count)); // TODO: Perhaps, the follow time should be proportional to the displacement. _timeRemaining[(int)type] = snapFollow ? CharacterController::FOLLOW_TIME_IMMEDIATE_SNAP : FOLLOW_TIME; } bool MyAvatar::FollowHelper::isActive(CharacterController::FollowType type) const { - int int_type = static_cast(type); - assert(int_type >= 0 && int_type < static_cast(CharacterController::FollowType::Count)); + assert((int)type >= 0 && (int)type < static_cast(CharacterController::FollowType::Count)); return _timeRemaining[(int)type] > 0.0f; }