Fixed warnings

This commit is contained in:
Robert Osfield 2009-01-07 10:32:59 +00:00
parent 85c510ba27
commit 98bd058317
15 changed files with 37 additions and 23 deletions

View File

@ -91,6 +91,8 @@ class ScopedReadLock
protected:
ReadWriteMutex& _mutex;
ScopedReadLock& operator = (const ScopedReadLock&) { return *this; }
};
@ -103,6 +105,8 @@ class ScopedWriteLock
protected:
ReadWriteMutex& _mutex;
ScopedWriteLock& operator = (const ScopedWriteLock&) { return *this; }
};
}

View File

@ -76,7 +76,7 @@ namespace osg {
notify(WARN)<<"Triangle Functor does not support Vec2d* vertex arrays"<<std::endl;
}
virtual void setVertexArray(unsigned int count,const Vec3d* vertices)
virtual void setVertexArray(unsigned int,const Vec3d*)
{
notify(WARN)<<"Triangle Functor does not support Vec3d* vertex arrays"<<std::endl;
}
@ -247,9 +247,9 @@ namespace osg {
for(IndexPointer iptr=indices;iptr<ilast;iptr+=1)
this->operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],
_treatVertexDataAsTemporary);
break;
this->operator()(_vertexArrayPtr[*(ilast)],_vertexArrayPtr[indices[0]],
_treatVertexDataAsTemporary);
break;
}
default:
break;

View File

@ -58,7 +58,7 @@ namespace osgAnimation
META_NodeVisitor("osgAnimation","BoneMapVisitor")
void apply(osg::Node& node) { return; }
void apply(osg::Node&) { return; }
void apply(osg::Transform& node)
{
Bone* bone = dynamic_cast<Bone*>(&node);

View File

@ -35,11 +35,12 @@ namespace osgAnimation
{
public:
Callback(){}
Callback(const Callback& nc,const osg::CopyOp&) {}
Callback(const Callback&,const osg::CopyOp&) {}
META_Object(osgAnimation,Callback);
virtual void operator()(Action* action) {}
virtual void operator()(Action* /*action*/) {}
void addNestedCallback(Callback* callback)
{
if (_nested.valid())
@ -56,6 +57,7 @@ namespace osgAnimation
typedef std::map<unsigned int, osg::ref_ptr<Callback> > FrameCallback;
META_Object(osgAnimation, Action);
Action()
{
_numberFrame = 25;
@ -63,7 +65,8 @@ namespace osgAnimation
_speed = 1.0;
_loop = 1;
}
Action(const Action& nc,const osg::CopyOp&) {}
Action(const Action&,const osg::CopyOp&) {}
void setCallback(double when, Callback* callback)
{
@ -520,7 +523,7 @@ namespace osgAnimation
public:
RunAction(Timeline* tm, Action* a) : _tm(tm), _action(a) {}
virtual void operator()(Action* action)
virtual void operator()(Action* /*action*/)
{
_tm->addActionAt(_tm->getCurrentFrame(), _action.get()); // warning we are trsversing the vector
}

View File

@ -46,7 +46,7 @@ namespace osgAnimation
META_Object(osgAnimation, VertexInfluenceMap);
VertexInfluenceMap() {}
VertexInfluenceMap(const osgAnimation::VertexInfluenceMap& infl, const osg::CopyOp&) {;}
VertexInfluenceMap(const osgAnimation::VertexInfluenceMap&, const osg::CopyOp&) {}
};

View File

@ -99,10 +99,11 @@ class ParameterOutput
protected:
ParameterOutput& operator = (const ParameterOutput&) { return *this; }
Output& _fw;
int _numItemsPerLine;
int _column;
};

View File

@ -28,10 +28,10 @@ class OSGGA_EXPORT CameraViewSwitchManipulator : public MatrixManipulator
virtual const char* className() const { return "CameraViewSwitcher"; }
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByMatrix(const osg::Matrixd& matrix) {}
virtual void setByMatrix(const osg::Matrixd& /*matrix*/) {}
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByInverseMatrix(const osg::Matrixd& matrix) {}
virtual void setByInverseMatrix(const osg::Matrixd& /*matrix*/) {}
/** get the position of the manipulator as 4x4 Matrix.*/
virtual osg::Matrixd getMatrix() const;
@ -53,7 +53,7 @@ class OSGGA_EXPORT CameraViewSwitchManipulator : public MatrixManipulator
virtual osg::Node* getNode() { return _node.get();}
/** Start/restart the manipulator.*/
virtual void init(const GUIEventAdapter& ea,GUIActionAdapter& us) { _currentView = 0; }
virtual void init(const GUIEventAdapter& /*ea*/,GUIActionAdapter& /*aa*/) { _currentView = 0; }
/** handle events, return true if handled, false otherwise.*/
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);

View File

@ -38,7 +38,9 @@ class ObjectRecordData : public osg::Object
_significance( 0 )
{}
ObjectRecordData( const ObjectRecordData& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY )
ObjectRecordData( const ObjectRecordData& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY ):
osg::Object(copy, copyop)
{
_flags = copy._flags;
_relativePriority = copy._relativePriority;

View File

@ -84,7 +84,7 @@ class OSGSIM_EXPORT OverlayNode : public osg::Group
double getOverlayBaseHeight() const { return _overlayBaseHeight; }
/** Set the clear color to use when rendering the overlay subgraph.*/
void setOverlayClearColor(const osg::Vec4& color) { _overlayClearColor = _overlayClearColor; }
void setOverlayClearColor(const osg::Vec4& color) { _overlayClearColor = color; }
/** Get the clear color to use when rendering the overlay subgraph.*/
const osg::Vec4& getOverlayClearColor() const { return _overlayClearColor; }

View File

@ -100,7 +100,7 @@ class OSGTERRAIN_EXPORT Layer : public osg::Object
virtual const osg::Image* getImage() const { return 0; }
virtual bool transform(float offset, float scale) { return false; }
virtual bool transform(float /*offset*/, float /*scale*/) { return false; }
virtual bool getValue(unsigned int /*i*/, unsigned int /*j*/, float& /*value*/) const { return false; }

View File

@ -24,7 +24,7 @@ namespace osgTerrain {
struct ValidDataOperator : public osg::Referenced
{
virtual bool operator() (float value) const { return true; }
virtual bool operator() (float /*value*/) const { return true; }
virtual bool operator() (const osg::Vec2& value) const { return operator()(value.x()) && operator()(value.y()) ; }
virtual bool operator() (const osg::Vec3& value) const { return operator()(value.x()) && operator()(value.y()) && operator()(value.z()); }
virtual bool operator() (const osg::Vec4& value) const { return operator()(value.x()) && operator()(value.y()) && operator()(value.z()) && operator()(value.w()); }

View File

@ -328,6 +328,9 @@ class OSGVIEWER_EXPORT ScreenCaptureHandler : public osgGA::GUIEventHandler
SavePolicy getSavePolicy() const { return _savePolicy; }
protected:
WriteToFile& operator = (const WriteToFile&) { return *this; }
const std::string _filename;
const std::string _extension;
@ -387,7 +390,7 @@ protected:
InteractiveImageHandler() {}
InteractiveImageHandler(const InteractiveImageHandler& rhs,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) {}
InteractiveImageHandler(const InteractiveImageHandler&,const osg::CopyOp& = osg::CopyOp::SHALLOW_COPY) {}
bool mousePosition(osgViewer::View* view, osg::NodeVisitor* nv, const osgGA::GUIEventAdapter& ea, int& x, int &y) const;

View File

@ -29,6 +29,7 @@ class OSGVOLUME_EXPORT Locator : public osg::Object
/** Copy constructor using CopyOp to manage deep vs shallow copy.*/
Locator(const Locator& locator,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(locator, copyop),
_transform(locator._transform) {}
META_Object(osgVolume, Locator);

View File

@ -37,7 +37,9 @@ class OSGWIDGET_EXPORT BrowserManager : public osg::Object
protected:
BrowserManager();
BrowserManager(const BrowserManager& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY) {}
BrowserManager(const BrowserManager& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
osg::Object(rhs,copyop) {}
virtual ~BrowserManager();
META_Object(osgWidget,BrowserManager)

View File

@ -172,18 +172,16 @@ class ObjectCallback: public CallbackInterface
typedef bool (T::*ObjectCallbackType)(Event&);
ObjectCallback(ObjectCallbackType callback, T* obj):
_callback (callback),
_object (obj) {
}
_object (obj),
_callback (callback) {}
virtual bool operator()(Event& ev) {
return (_object->*_callback)(ev);
}
private:
ObjectCallbackType _callback;
T* _object;
ObjectCallbackType _callback;
};
// The object that facilitates general functions as callbacks.