Thanks Jordi, changes look good, now merged and submitted to svn/trunk. I haven't merged with OSG-3.2 branch as I'm not confident that it won't affect the ABI. Thoughts?
On 16 January 2014 15:19, Jordi Torres <[email protected]> wrote: > Hi Robert , > > We have a code using gcc with -Wextra flag and using OSG as a third party > library. It does not compile when importing <osgViewer/Viewer> failing in > EventHandler and GUIEventHandler: > > .... > > GUIEventHandler: In copy constructor > 'osgGA::GUIEventHandler::GUIEventHandler(const osgGA::GUIEventHandler&, > const osg::CopyOp&)': > > > /include/osgGA/GUIEventHandler:56:9: error: base class 'class osg::Object' > should be explicitly initialized in the copy constructor [-Werror=extra] > > > It seems the diamond problem: > > > A = osg::Object > / \ > / \--> Virtual inheritance > B C > \ / > \ / > D = EventHandler > | > | > E = GUIEventHandler > > > The most derived class(E) handles the instantiation of A (osg::Object), > but all have to be responsible in case they are the ones instantiated. > > > In case A is not initialized in the copy constructor of derived classes > the default constructor will be called, which seems a bug. > > I've added osg::Object to the initalization list of EventHandler and > GUIEventHandler copy constructors, because both classes are instantiables. > > Cheers. > > Jordi Torres > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > >
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
