Fix build error and a pair of warnings

The error was about casting between osg::Callback* and osg::NodeCallback*
The warnings are both about virtual classes with non-virtual destructors
c++11
Alexander "Ace" Olofsson 10 years ago
parent 2065e0fa2d
commit 5d24091364

@ -93,6 +93,7 @@ protected:
boost::shared_ptr<float> mTimePtr;
public:
virtual ~AnimationTime() { }
void setTimePtr(boost::shared_ptr<float> time)
{ mTimePtr = time; }

@ -721,12 +721,12 @@ public:
if (stateset->getAttribute(osg::StateAttribute::MATERIAL))
{
SceneUtil::CompositeStateSetUpdater* composite = NULL;
osg::NodeCallback* callback = node.getUpdateCallback();
osg::NodeCallback* callback = dynamic_cast<osg::NodeCallback*>(node.getUpdateCallback());
while (callback)
{
if ((composite = dynamic_cast<SceneUtil::CompositeStateSetUpdater*>(callback)))
break;
callback = callback->getNestedCallback();
callback = dynamic_cast<osg::NodeCallback*>(callback->getNestedCallback());
}
if (composite)

@ -19,6 +19,8 @@ namespace MWRender
float mStartTime;
public:
WeaponAnimationTime(Animation* animation) : mAnimation(animation), mStartTime(0) {}
virtual ~WeaponAnimationTime() { }
void setGroup(const std::string& group);
void updateStartTime();

Loading…
Cancel
Save