From ce3cce24a56df230616f13622deb59464b4b36d4 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 9 Feb 2016 16:20:17 +0100 Subject: [PATCH] Remove unneeded dynamic_cast --- apps/openmw/mwrender/animation.cpp | 4 ++-- apps/openmw/mwrender/npcanimation.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 5aea13660..c86878e3d 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -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(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)); diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 10c0032d4..709653cd8 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -847,9 +847,9 @@ void NpcAnimation::addControllers() if (mViewMode == VM_FirstPerson) { NodeMap::iterator found = mNodeMap.find("bip01 neck"); - if (found != mNodeMap.end() && dynamic_cast(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));