1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-23 06:41:08 +00:00

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.
This commit is contained in:
scrawl 2015-11-09 18:57:17 +01:00
parent 1200ff9186
commit bd8332d2b0
3 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ namespace NifOsg
{ {
public: public:
UVController(); 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); UVController(const Nif::NiUVData *data, std::set<int> textureUnits);
META_Object(NifOsg,UVController) META_Object(NifOsg,UVController)

View File

@ -60,7 +60,7 @@ namespace NifOsg
InverseWorldMatrix() 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() : osg::Object(), osg::NodeCallback()
{ {
} }

View File

@ -121,7 +121,7 @@ namespace SceneUtil
: mLightManager(NULL) : mLightManager(NULL)
, mLastFrameNumber(0) , 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) : osg::Object(copy, copyop), osg::NodeCallback(copy, copyop)
, mLightManager(copy.mLightManager) , mLightManager(copy.mLightManager)
, mLastFrameNumber(0) , mLastFrameNumber(0)