From 8202ccc67949401bf6773d10eab0c4cdf8d30383 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 23 Dec 2010 09:59:35 +0000 Subject: [PATCH] From Jean-Sebastien, "In my auto-build today there are 3 errors caused by using a ref_ptr in a function taking a T* when building without the implicit conversion." --- examples/osgterrain/osgterrain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/osgterrain/osgterrain.cpp b/examples/osgterrain/osgterrain.cpp index 797652470..d57c6b404 100644 --- a/examples/osgterrain/osgterrain.cpp +++ b/examples/osgterrain/osgterrain.cpp @@ -198,14 +198,14 @@ int main(int argc, char** argv) return 1; } - osg::ref_ptr terrain = findTopMostNodeOfType(rootnode); + osg::ref_ptr terrain = findTopMostNodeOfType(rootnode.get()); if (!terrain) { // no Terrain node present insert one above the loaded model. terrain = new osgTerrain::Terrain; // if CoordinateSystemNode is present copy it's contents into the Terrain, and discard it. - osg::CoordinateSystemNode* csn = findTopMostNodeOfType(rootnode);; + osg::CoordinateSystemNode* csn = findTopMostNodeOfType(rootnode.get()); if (csn) { terrain->set(*csn); @@ -227,7 +227,7 @@ int main(int argc, char** argv) terrain->setBlendingPolicy(blendingPolicy); // register our custom handler for adjust Terrain settings - viewer.addEventHandler(new TerrainHandler(terrain)); + viewer.addEventHandler(new TerrainHandler(terrain.get())); // add a viewport to the viewer and attach the scene graph. viewer.setSceneData( rootnode.get() );