1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-03 13:09:40 +00:00

Remove unnecessary casts

This commit is contained in:
Capostrophic 2020-05-26 15:01:26 +03:00
parent fc9a10ba48
commit 7a9403aeed

View file

@ -1175,12 +1175,7 @@ namespace NifOsg
osg::ref_ptr<osg::Drawable> drawable;
osg::ref_ptr<osg::Geometry> geom (new osg::Geometry);
triShapeToGeometry(nifNode, geom, parentNode, composite, boundTextures, animflags);
Nif::ControllerPtr ctrl;
if (nifNode->recType == Nif::RC_NiTriShape)
ctrl = static_cast<const Nif::NiTriShape*>(nifNode)->controller;
else
ctrl = static_cast<const Nif::NiTriStrips*>(nifNode)->controller;
for (; !ctrl.empty(); ctrl = ctrl->next)
for (Nif::ControllerPtr ctrl = nifNode->controller; !ctrl.empty(); ctrl = ctrl->next)
{
if (!(ctrl->flags & Nif::NiNode::ControllerFlag_Active))
continue;