Cleaned up warning generated when compiling osgocculusviewer

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14695 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield 2015-02-17 10:36:41 +00:00
parent 6bddbdf074
commit 53198f2e9b
7 changed files with 35 additions and 82 deletions

View File

@ -26,7 +26,8 @@ class OSG_EXPORT Callback : public virtual Object {
Callback(){}
Callback(const Callback& cb,const CopyOp&):
Callback(const Callback& cb,const CopyOp& copyop):
osg::Object(cb, copyop),
_nestedCallback(cb._nestedCallback) {}
META_Object(osg, Callback);
@ -96,7 +97,10 @@ class OSG_EXPORT CallbackObject : public virtual osg::Callback
public:
CallbackObject() {}
CallbackObject(const std::string& name) { setName(name); }
CallbackObject(const CallbackObject& rhs, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):osg::Callback(rhs,copyop) {}
CallbackObject(const CallbackObject& co, const osg::CopyOp copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(co, copyop),
osg::Callback(co,copyop) {}
META_Object(osg, CallbackObject);
virtual CallbackObject* asCallbackObject() { return this; }

View File

@ -274,7 +274,7 @@ class DummyObject : public osg::Object
{
public:
DummyObject() {}
DummyObject(const DummyObject& dummy, const osg::CopyOp& copyop) {}
DummyObject(const DummyObject&, const osg::CopyOp&) {}
META_Object(osg, DummyObject)
protected:
virtual ~DummyObject() {}

View File

@ -31,7 +31,7 @@ class Script : public osg::Object
public:
Script():_modifiedCount(0) {}
Script(const std::string& language, const std::string& str): _language(language), _script(str), _modifiedCount(0) {}
Script(const Script& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): _language(rhs._language), _script(rhs._script), _modifiedCount(0) {}
Script(const Script& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): osg::Object(rhs,copyop), _language(rhs._language), _script(rhs._script), _modifiedCount(0) {}
META_Object(osg, Script)
@ -59,7 +59,10 @@ class OSG_EXPORT ScriptNodeCallback : public osg::NodeCallback
{
public:
ScriptNodeCallback(Script* script=0, const std::string& entryPoint="") : _script(script), _entryPoint(entryPoint) {}
ScriptNodeCallback(const ScriptNodeCallback& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): osg::NodeCallback(rhs,copyop), _script(rhs._script) {}
ScriptNodeCallback(const ScriptNodeCallback& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(rhs,copyop),
osg::Callback(rhs,copyop),
osg::NodeCallback(rhs,copyop), _script(rhs._script) {}
META_Object(osg, ScriptNodeCallback)

View File

@ -839,15 +839,15 @@ public:
Type getElementType() const { return _elementType; }
unsigned int getElementSize() const { return _elementSize; }
virtual unsigned int size(const osg::Object& obj) const { return 0; }
virtual void resize(osg::Object& obj, unsigned int numElements) const {}
virtual void reserve(osg::Object& obj, unsigned int numElements) const {}
virtual void clear(osg::Object& obj) const {}
virtual void addElement(osg::Object& obj, void* ptr) const {}
virtual void insertElement(osg::Object& obj, unsigned int index, void* ptr) const {}
virtual void setElement(osg::Object& obj, unsigned int index, void* ptr) const {}
virtual void* getElement(osg::Object& obj, unsigned int index) const { return 0; }
virtual const void* getElement(const osg::Object& obj, unsigned int index) const { return 0; }
virtual unsigned int size(const osg::Object& /*obj*/) const { return 0; }
virtual void resize(osg::Object& /*obj*/, unsigned int /*numElements*/) const {}
virtual void reserve(osg::Object& /*obj*/, unsigned int /*numElements*/) const {}
virtual void clear(osg::Object& /*obj*/) const {}
virtual void addElement(osg::Object& /*obj*/, void* /*ptr*/) const {}
virtual void insertElement(osg::Object& /*obj*/, unsigned int /*index*/, void* /*ptr*/) const {}
virtual void setElement(osg::Object& /*obj*/, unsigned int /*index*/, void* /*ptr*/) const {}
virtual void* getElement(osg::Object& /*obj*/, unsigned int /*index*/) const { return 0; }
virtual const void* getElement(const osg::Object& /*obj*/, unsigned int /*index*/) const { return 0; }
protected:
Type _elementType;
@ -1199,7 +1199,7 @@ public:
virtual bool valid() const { return false; }
virtual const void* getKey() const { return 0; }
virtual void* getElement() const { return 0; }
virtual void setElement(void* ptr) const {}
virtual void setElement(void* /*ptr*/) const {}
protected:
BaseSerializer::Type _keyType;
@ -1224,14 +1224,14 @@ public:
Type getElementType() const { return _elementType; }
unsigned int getElementSize() const { return _elementSize; }
virtual void clear(osg::Object& obj) const {}
virtual void setElement(osg::Object& obj, void* ptrKey, void* ptrValue) const {}
virtual void* getElement(osg::Object& obj, void* ptrKey) const { return 0; }
virtual const void* getElement(const osg::Object& obj, void* ptrKey) const { return 0; }
virtual unsigned int size(const osg::Object& obj) const { return 0; }
virtual void clear(osg::Object& /*obj*/) const {}
virtual void setElement(osg::Object& /*obj*/, void* /*ptrKey*/, void* /*ptrValue*/) const {}
virtual void* getElement(osg::Object& /*obj*/, void* /*ptrKey*/) const { return 0; }
virtual const void* getElement(const osg::Object& /*obj*/, void* /*ptrKey*/) const { return 0; }
virtual unsigned int size(const osg::Object& /*obj*/) const { return 0; }
virtual MapIteratorObject* createIterator(osg::Object& obj) const { return 0; }
virtual MapIteratorObject* createReverseIterator(osg::Object& obj) const { return 0; }
virtual MapIteratorObject* createIterator(osg::Object& /*obj*/) const { return 0; }
virtual MapIteratorObject* createReverseIterator(osg::Object& /*obj*/) const { return 0; }
protected:
Type _keyType;

View File

@ -36,7 +36,8 @@ public:
EventHandler() {}
EventHandler(const EventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Callback(eh,copyop),
osg::Object(eh, copyop),
osg::Callback(eh, copyop),
osg::NodeCallback(eh, copyop),
osg::Drawable::EventCallback(eh, copyop) {}

View File

@ -50,16 +50,11 @@ class OSGGA_EXPORT GUIEventHandler : public EventHandler
{
public:
#if 1
GUIEventHandler() {}
GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Callback(eh, copyop), EventHandler(eh, copyop) {}
#else
GUIEventHandler() : _ignoreHandledEventsMask(GUIEventAdapter::NONE) {}
GUIEventHandler(const GUIEventHandler& eh,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
EventHandler(eh, copyop)
_ignoreHandledEventsMask(eh._ignoreHandledEventsMask) {}
#endif
osg::Object(eh, copyop),
osg::Callback(eh, copyop),
EventHandler(eh, copyop) {}
META_Object(osgGA,GUIEventHandler);
@ -69,59 +64,9 @@ public:
/** Handle events, return true if handled, false otherwise. */
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor*) { return handle(ea,aa); }
#if 0
/** Convenience method that only passes on to the handle(,,,) method events that either haven't been
* handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask.
* Note, this method is an inline method, and not appropriate for users to override, override the handle(,,,)
* method instead.*/
inline bool handleWithCheckAgainstIgnoreHandledEventsMask(const GUIEventAdapter& ea,GUIActionAdapter& aa, osg::Object* object, osg::NodeVisitor* nv)
{
if (!ea.getHandled() ||
(ea.getEventType() & _ignoreHandledEventsMask)==0)
{
bool handled = handle(ea,aa,object,nv);
if (handled) ea.setHandled(true);
return handled;
}
else
{
return false;
}
}
#endif
/** Deprecated, Handle events, return true if handled, false otherwise. */
virtual bool handle(const GUIEventAdapter&,GUIActionAdapter&) { return false; }
#if 0
/** Convenience method that only passes on to the handle(,) method events that either haven't been
* handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask.
* Note, this method is an inline method, and not appropriate for users to override, override the handle(,)
* method instead.*/
inline bool handleWithCheckAgainstIgnoreHandledEventsMask(const GUIEventAdapter& ea,GUIActionAdapter& aa)
{
if (!ea.getHandled() ||
(ea.getEventType() & _ignoreHandledEventsMask)==0)
{
bool handled = handle(ea,aa);
if (handled) ea.setHandled(true);
return handled;
}
else
{
return false;
}
}
/** Set a mask of osgGA::GUIEeventAdapter::Event to be ignored if marked as handled */
void setIgnoreHandledEventsMask(unsigned int mask) { _ignoreHandledEventsMask = mask; }
/** Get the event mask of the osgGA::GUIEeventAdapter::Event to be ignored if marked as handled */
unsigned int getIgnoreHandledEventsMask() const { return _ignoreHandledEventsMask; };
protected:
unsigned int _ignoreHandledEventsMask;
#endif
protected:
virtual ~GUIEventHandler();

View File

@ -528,7 +528,7 @@ protected:
InteractiveImageHandler() {}
InteractiveImageHandler(const InteractiveImageHandler&,const osg::CopyOp& = osg::CopyOp::SHALLOW_COPY):
osg::Callback(), osgGA::GUIEventHandler(), osg::Drawable::CullCallback(), _fullscreen(false) {}
osg::Object(), osg::Callback(), osgGA::GUIEventHandler(), osg::Drawable::CullCallback(), _fullscreen(false) {}
bool mousePosition(osgViewer::View* view, osg::NodeVisitor* nv, const osgGA::GUIEventAdapter& ea, int& x, int &y) const;