From 9962df9fb7303dc52f52bf448bef407342286008 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 4 Jan 2021 16:33:50 +0200 Subject: SL-14529 Replace dynamic_cast to LLAvatarJoint with static casts Replaced couple (LLAvatarJoint*) for consistency --- indra/newview/llviewerjoint.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerjoint.cpp') diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index a448a95904..9653e80b53 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -143,8 +143,10 @@ U32 LLViewerJoint::render( F32 pixelArea, BOOL first_pass, BOOL is_dummy ) //---------------------------------------------------------------- for (LLJoint* j : mChildren) { - LLAvatarJoint* joint = dynamic_cast(j); - F32 jointLOD = joint ? joint->getLOD() : 0; + // LLViewerJoint is derived from LLAvatarJoint, + // all children of LLAvatarJoint are assumed to be LLAvatarJoint + LLAvatarJoint* joint = static_cast(j); + F32 jointLOD = joint->getLOD(); if (pixelArea >= jointLOD || sDisableLOD) { triangle_count += joint->render( pixelArea, TRUE, is_dummy ); -- cgit v1.2.3