Permalink
Browse files

Fixed CoverityScan reported errors

  • Loading branch information...
robertosfield committed Nov 13, 2017
1 parent d98d9c9 commit 9c605ba9beaca8d5ff90f269a9450533418cf1c0
@@ -43,7 +43,7 @@ struct osgAnimation_AnimationManagerBasegetnumAnimations : public osgDB::MethodO
virtual bool run(void* objectPtr, osg::Parameters& inputParameters, osg::Parameters& outputParameters) const
{
osgAnimation::AnimationManagerBase* group = dynamic_cast<osgAnimation::AnimationManagerBase*>(reinterpret_cast<osg::Object*>(objectPtr));
outputParameters.push_back(new osg::UIntValueObject("return",group->getNumRegisteredAnimations()));
if (group) outputParameters.push_back(new osg::UIntValueObject("return",group->getNumRegisteredAnimations()));
return true;
}
};
@@ -64,8 +64,7 @@ struct osgAnimation_AnimationManagerBasegetAnimation : public osgDB::MethodObjec
if (uivo) index = uivo->getValue();
}
osgAnimation::AnimationManagerBase* group = dynamic_cast<osgAnimation::AnimationManagerBase*>(reinterpret_cast<osg::Object*>(objectPtr));
outputParameters.push_back(group->getRegisteredAnimation(index));
if (group) outputParameters.push_back(group->getRegisteredAnimation(index));
return true;
}
@@ -15,7 +15,7 @@ struct BasicAnimationManagerIsplaying : public osgDB::MethodObject
osgAnimation::Animation* child = dynamic_cast<osgAnimation::Animation*>(inputParameters[0].get());
if (!child) return false;
osgAnimation::BasicAnimationManager* group = dynamic_cast<osgAnimation::BasicAnimationManager*>(reinterpret_cast<osg::Object*>(objectPtr));
outputParameters.push_back(new osg::BoolValueObject("return", group->isPlaying(child)));
id (group) outputParameters.push_back(new osg::BoolValueObject("return", group->isPlaying(child)));
return true;
}
};
@@ -28,7 +28,7 @@ struct BasicAnimationManagerfindAnimation : public osgDB::MethodObject
osgAnimation::Animation* child = dynamic_cast<osgAnimation::Animation*>(inputParameters[0].get());
if (!child) return false;
osgAnimation::BasicAnimationManager* group = dynamic_cast<osgAnimation::BasicAnimationManager*>(reinterpret_cast<osg::Object*>(objectPtr));
outputParameters.push_back(new osg::BoolValueObject("return",group->findAnimation(child)));
id (group) outputParameters.push_back(new osg::BoolValueObject("return",group->findAnimation(child)));
return true;
}
};
@@ -41,7 +41,7 @@ struct BasicAnimationManagerPlayanimation : public osgDB::MethodObject
osgAnimation::Animation* child = dynamic_cast<osgAnimation::Animation*>(inputParameters[0].get());
if (!child) return false;
osgAnimation::BasicAnimationManager* group = dynamic_cast<osgAnimation::BasicAnimationManager*>(reinterpret_cast<osg::Object*>(objectPtr));
group->playAnimation(child);
id (group) group->playAnimation(child);
return true;
}
};
@@ -54,7 +54,7 @@ struct BasicAnimationManagerStopanimation : public osgDB::MethodObject
osgAnimation::Animation* child = dynamic_cast<osgAnimation::Animation*>(inputParameters[0].get());
if (!child) return false;
osgAnimation::BasicAnimationManager* group = dynamic_cast<osgAnimation::BasicAnimationManager*>(reinterpret_cast<osg::Object*>(objectPtr));
group->stopAnimation(child);
id (group) group->stopAnimation(child);
return true;
}
};

0 comments on commit 9c605ba

Please sign in to comment.