Remove unneeded dynamic_cast

coverity_scan
scrawl 9 years ago
parent 8ece1885cd
commit ce3cce24a5

@ -1327,9 +1327,9 @@ namespace MWRender
if (mPtr.getClass().isBipedal(mPtr))
{
NodeMap::const_iterator found = getNodeMap().find("bip01 head");
if (found != getNodeMap().end() && dynamic_cast<osg::MatrixTransform*>(found->second.get()))
if (found != getNodeMap().end())
{
osg::Node* node = found->second;
osg::MatrixTransform* node = found->second;
mHeadController = new RotateController(mObjectRoot.get());
node->addUpdateCallback(mHeadController);
mActiveControllers.insert(std::make_pair(node, mHeadController));

@ -847,9 +847,9 @@ void NpcAnimation::addControllers()
if (mViewMode == VM_FirstPerson)
{
NodeMap::iterator found = mNodeMap.find("bip01 neck");
if (found != mNodeMap.end() && dynamic_cast<osg::MatrixTransform*>(found->second.get()))
if (found != mNodeMap.end())
{
osg::Node* node = found->second;
osg::MatrixTransform* node = found->second.get();
mFirstPersonNeckController = new NeckController(mObjectRoot.get());
node->addUpdateCallback(mFirstPersonNeckController);
mActiveControllers.insert(std::make_pair(node, mFirstPersonNeckController));

Loading…
Cancel
Save