From ffe77a785ac1ec056b7bd260f67087f8144719d0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 16 Dec 2008 20:49:12 +0000 Subject: [PATCH] Build fixes for when the implict ref_ptr<> cast is not enabled --- examples/osganimationtimeline/osganimationtimeline.cpp | 3 ++- src/osgPlugins/bvh/ReaderWriterBVH.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/osganimationtimeline/osganimationtimeline.cpp b/examples/osganimationtimeline/osganimationtimeline.cpp index a429dddb1..b28065376 100644 --- a/examples/osganimationtimeline/osganimationtimeline.cpp +++ b/examples/osganimationtimeline/osganimationtimeline.cpp @@ -177,7 +177,8 @@ int main (int argc, char* argv[]) } osg::ref_ptr tl = new osgAnimation::TimelineAnimationManager(*animationManager); - root->setUpdateCallback(tl); + root->setUpdateCallback(tl.get()); + ExampleTimelineUsage* callback = new ExampleTimelineUsage(tl.get()); root->setEventCallback(callback); root->getUpdateCallback()->addNestedCallback(callback); diff --git a/src/osgPlugins/bvh/ReaderWriterBVH.cpp b/src/osgPlugins/bvh/ReaderWriterBVH.cpp index 52949bd6f..439f316fc 100644 --- a/src/osgPlugins/bvh/ReaderWriterBVH.cpp +++ b/src/osgPlugins/bvh/ReaderWriterBVH.cpp @@ -79,7 +79,7 @@ public: osg::ref_ptr bone = new osgAnimation::Bone( parent->getName()+"End" ); bone->setBindMatrixInBoneSpace( osg::Matrix::translate(offsetEndSite) ); bone->setDataVariance( osg::Object::DYNAMIC ); - parent->addChild( bone ); + parent->addChild( bone.get() ); if ( _drawingFlag ) parent->addChild( createRefGeometry(offsetEndSite, 0.5).get() ); @@ -96,7 +96,7 @@ public: osg::ref_ptr bone = new osgAnimation::Bone( fr[1].getStr() ); bone->setDefaultUpdateCallback(); bone->setDataVariance( osg::Object::DYNAMIC ); - parent->addChild( bone ); + parent->addChild( bone.get() ); _joints.push_back( JointNode(bone, 0) ); int entry = fr[1].getNoNestedBrackets();