From b42f9d836b4c0f7fbd4bdae1734021e2a09fdbe8 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 1 Jun 2024 15:49:26 +0200 Subject: Re-enable a lot of compiler warnings for MSVC and address the C4267 "possible loss of precision" warnings --- indra/llcharacter/llmotioncontroller.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/llcharacter/llmotioncontroller.cpp') diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index 5f99633a58..c204c96f6c 100644 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -156,11 +156,11 @@ LLMotionController::~LLMotionController() void LLMotionController::incMotionCounts(S32& num_motions, S32& num_loading_motions, S32& num_loaded_motions, S32& num_active_motions, S32& num_deprecated_motions) { - num_motions += mAllMotions.size(); - num_loading_motions += mLoadingMotions.size(); - num_loaded_motions += mLoadedMotions.size(); - num_active_motions += mActiveMotions.size(); - num_deprecated_motions += mDeprecatedMotions.size(); + num_motions += static_cast(mAllMotions.size()); + num_loading_motions += static_cast(mLoadingMotions.size()); + num_loaded_motions += static_cast(mLoadedMotions.size()); + num_active_motions += static_cast(mActiveMotions.size()); + num_deprecated_motions += static_cast(mDeprecatedMotions.size()); } //----------------------------------------------------------------------------- @@ -222,7 +222,7 @@ void LLMotionController::purgeExcessMotions() } // clean up all inactive, loaded motions - for (LLUUID motion_id : motions_to_kill) + for (const LLUUID& motion_id : motions_to_kill) { // look up the motion again by ID to get canonical instance // and kill it only if that one is inactive @@ -233,7 +233,7 @@ void LLMotionController::purgeExcessMotions() } } - U32 loaded_count = mLoadedMotions.size(); + U32 loaded_count = static_cast(mLoadedMotions.size()); if (loaded_count > (2 * MAX_MOTION_INSTANCES) && loaded_count > mLastCountAfterPurge) { LL_WARNS_ONCE("Animation") << loaded_count << " Loaded Motions. Amount of motions is over limit." << LL_ENDL; -- cgit v1.2.3