Hi Neil, On Fri, Oct 3, 2008 at 2:34 PM, Neil Groves <[EMAIL PROTECTED]> wrote: > May I ask what the issue was in src.osgUtil/Simplifier.cpp? I'd be > interested to find out as there may be a nice clean fix that avoids > conditional compilation. I wonder if it might be worth considering a traits > or policy based solution for parameterising conversions?
There error occurred on a couple of lines that were of the form: ref_ptr<MyObejct> otherMyObjectPtr = .... ref_ptr<MyObject> myObjectPtr = otherMyObjectPtr.valid() ? otherMyObjectPtr : createMyObject(); // problem line Where createMyObejct() returned a pointer to MyObject rather than a ref_ptr<MyObject> so that the type types on either side of the : where a ref_ptr<>and MyObject* respectively. Changing the line to: ref_ptr<MyObject> myObjectPtr = otherMyObjectPtr.valid() ? otherMyObjectPtr.get() : createMyObject(); Solved the compile issue. I can only presume previously the MyObejct* pointer was being automatically converted into a ref_ptr<> while now it isn't.... To tell you the exact error I'll need to revert my fix, and then enable the compile of your T* operator(), as right now I'm testing the optional build of this code. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
