From a29aef14f155f8a89e59e80f8f0393b4a12045c8 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 2 Dec 2015 14:24:48 +0100 Subject: [PATCH] Eliminate a dynamic_cast in ParticleSystemController --- components/nifosg/controller.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/nifosg/controller.cpp b/components/nifosg/controller.cpp index b8a38cf0fd..28f61e4b6c 100644 --- a/components/nifosg/controller.cpp +++ b/components/nifosg/controller.cpp @@ -435,10 +435,9 @@ void ParticleSystemController::operator() (osg::Node* node, osg::NodeVisitor* nv { if (hasInput()) { - osgParticle::ParticleProcessor* emitter = dynamic_cast(node); + osgParticle::ParticleProcessor* emitter = static_cast(node); float time = getInputValue(nv); - if (emitter) - emitter->setEnabled(time >= mEmitStart && time < mEmitStop); + emitter->setEnabled(time >= mEmitStart && time < mEmitStop); } traverse(node, nv); }