Hi Bjorn,

On 18 August 2015 at 13:14, Robert Osfield <[email protected]> wrote:

> Perhaps it's time to just remove that if statement and standarise of the
> writeObject().
>


I have just checked into svn/trunk the following changes:


Index: include/osgDB/OutputStream
===================================================================
--- include/osgDB/OutputStream  (revision 15113)
+++ include/osgDB/OutputStream  (working copy)
@@ -145,13 +145,13 @@
     OutputStream& operator<<( const osg::BoundingSphered& bb );

     OutputStream& operator<<( const osg::Image* img ) { writeImage(img);
return *this; }
-    OutputStream& operator<<( const osg::Array* a ) { if
(OPENSCENEGRAPH_SOVERSION>=112) writeObject(a); else writeArray(a); return
*this; }
-    OutputStream& operator<<( const osg::PrimitiveSet* p ) { if
(OPENSCENEGRAPH_SOVERSION>=112) writeObject(p); else writePrimitiveSet(p);
return *this; }
+    OutputStream& operator<<( const osg::Array* a ) { writeObject(a);
return *this; }
+    OutputStream& operator<<( const osg::PrimitiveSet* p ) {
writeObject(p); return *this; }
     OutputStream& operator<<( const osg::Object* obj ) { writeObject(obj);
return *this; }

     OutputStream& operator<<( const osg::ref_ptr<osg::Image>& ptr ) {
writeImage(ptr.get()); return *this; }
-    OutputStream& operator<<( const osg::ref_ptr<osg::Array>& ptr ) { if
(OPENSCENEGRAPH_SOVERSION>=112) writeObject(ptr.get()); else
writeArray(ptr.get()); return *this; }
-    OutputStream& operator<<( const osg::ref_ptr<osg::PrimitiveSet>& ptr )
{ if (OPENSCENEGRAPH_SOVERSION>=112) writeObject(ptr.get()); else
writePrimitiveSet(ptr.get()); return *this; }
+    OutputStream& operator<<( const osg::ref_ptr<osg::Array>& ptr ) {
writeObject(ptr.get()); return *this; }
+    OutputStream& operator<<( const osg::ref_ptr<osg::PrimitiveSet>& ptr )
{ writeObject(ptr.get()); return *this; }

     template<typename T> OutputStream& operator<<( const osg::ref_ptr<T>&
ptr ) { writeObject(ptr.get()); return *this; }

I am thinking about making an OSG-3.4.1 quite soon to wrap up a couple of
fixes, unfortunately the changes will break the binary compatibility,
albeit in a very small way.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to