@@ -171,7 +171,7 @@ void CKinematics::LL_ClearAdditionalTransform(u16 bone_id)
171171}
172172
173173void CKinematics::BuildBoneMatrix (
174- const CBoneData* bd, CBoneInstance& bi, const Fmatrix* parent, u8 /* channel_mask = (1<<0)*/ )
174+ const CBoneData* bd, CBoneInstance& bi, const Fmatrix* parent, u8 channel_mask /* = (1<<0)*/ )
175175{
176176 bi.mTransform .mul_43 (*parent, bd->bind_transform );
177177 CalculateBonesAdditionalTransforms (bd, bi, parent, channel_mask); // --#SM+#--
@@ -182,18 +182,14 @@ void CKinematics::CalculateBonesAdditionalTransforms(
182182 const CBoneData* bd, CBoneInstance& bi, const Fmatrix* parent, u8 channel_mask /* = (1<<0)*/ )
183183{
184184 // bi.mTransform.c - содержит смещение относительно первой кости модели\центра сцены (0, 0, 0)
185- BONE_TRANSFORM_VECTOR_IT it = m_bones_offsets.begin ();
186- while (it != m_bones_offsets.end ())
185+ for (auto & it : m_bones_offsets)
187186 {
188- if (it-> m_bone_id == bd->GetSelfID ())
187+ if (it. m_bone_id == bd->GetSelfID ())
189188 {
190- Fvector vOldPos = bi.mTransform .c ;
191- bi.mTransform .mulB_43 (it-> m_transform ); // Rotation
192- bi.mTransform .c .add (vOldPos, it-> m_transform .c ); // Translation
189+ const Fvector vOldPos = bi.mTransform .c ;
190+ bi.mTransform .mulB_43 (it. m_transform ); // Rotation
191+ bi.mTransform .c .add (vOldPos, it. m_transform .c ); // Translation
193192 }
194-
195- // next
196- ++it;
197193 }
198194}
199195
0 commit comments