Remove default copyop argument for nodecallback copy constructors

Works around a compiler warning with OSG 3.4:

warning: base class 'class osg::Callback' should be explicitly initialized in the copy constructor [-Wextra]

With no default argument for osg::CopyOp&, the compiler no longer sees the function as a real copy constructor and stops warning about the missing virtual initializations.

We don't care about this warning because there is nothing interesting to initialize in the osg::NodeCallback base anyway.

A proper fix for the warning would require to inserting OSG_VERSION conditional compiling all over the place, that is as long as we are still supporting OSG 3.2.
openmw-37
scrawl 9 years ago
parent 1200ff9186
commit bd8332d2b0

@ -146,7 +146,7 @@ namespace NifOsg
{
public:
UVController();
UVController(const UVController&,const osg::CopyOp& = osg::CopyOp::SHALLOW_COPY);
UVController(const UVController&,const osg::CopyOp&);
UVController(const Nif::NiUVData *data, std::set<int> textureUnits);
META_Object(NifOsg,UVController)

@ -60,7 +60,7 @@ namespace NifOsg
InverseWorldMatrix()
{
}
InverseWorldMatrix(const InverseWorldMatrix& copy, const osg::CopyOp& op = osg::CopyOp::SHALLOW_COPY)
InverseWorldMatrix(const InverseWorldMatrix& copy, const osg::CopyOp& op)
: osg::Object(), osg::NodeCallback()
{
}

@ -121,7 +121,7 @@ namespace SceneUtil
: mLightManager(NULL)
, mLastFrameNumber(0)
{}
LightListCallback(const LightListCallback& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY)
LightListCallback(const LightListCallback& copy, const osg::CopyOp& copyop)
: osg::Object(copy, copyop), osg::NodeCallback(copy, copyop)
, mLightManager(copy.mLightManager)
, mLastFrameNumber(0)

Loading…
Cancel
Save