From 097aedf23cf7496b76f908823bd2225c9652a680 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 28 Jun 2013 12:00:43 +0000 Subject: [PATCH] From David Callu, warning fixes and removal of spaces at end of lines. --- include/OpenThreads/Exports | 4 + include/osg/BufferObject | 4 +- include/osg/Export | 6 ++ include/osg/ImageStream | 8 +- include/osg/TextureBuffer | 18 ++-- include/osg/ValueObject | 84 +++++++++---------- include/osgAnimation/Action | 4 +- include/osgAnimation/AnimationUpdateCallback | 2 +- include/osgAnimation/MorphGeometry | 2 +- include/osgDB/DatabaseRevisions | 6 +- include/osgGA/GUIEventAdapter | 33 ++++---- include/osgManipulator/Constraint | 2 +- include/osgParticle/DomainOperator | 16 ++-- include/osgQt/QFontImplementation | 2 +- include/osgSim/ShapeAttribute | 2 +- include/osgText/Font | 2 +- include/osgVolume/Locator | 2 +- src/OpenThreads/pthreads/PThread.cpp | 28 ++++--- src/osg/BufferObject.cpp | 4 +- src/osg/GraphicsCostEstimator.cpp | 16 ++-- src/osg/KdTree.cpp | 1 + src/osg/Notify.cpp | 2 +- src/osg/PrimitiveSet.cpp | 2 + src/osg/Referenced.cpp | 8 ++ src/osg/Shader.cpp | 3 +- src/osg/ShaderAttribute.cpp | 2 +- src/osg/Texture.cpp | 8 +- src/osg/glu/libtess/dict.cpp | 2 +- src/osg/glu/libtess/memalloc.cpp | 2 +- src/osg/glu/libutil/mipmap.cpp | 20 ++--- src/osgAnimation/AnimationManagerBase.cpp | 2 +- src/osgAnimation/Skeleton.cpp | 2 +- src/osgAnimation/StackedMatrixElement.cpp | 2 +- src/osgAnimation/StackedQuaternionElement.cpp | 2 +- src/osgAnimation/StackedRotateAxisElement.cpp | 2 +- src/osgAnimation/StackedScaleElement.cpp | 2 +- src/osgAnimation/StackedTransform.cpp | 3 +- src/osgAnimation/StackedTranslateElement.cpp | 2 +- src/osgAnimation/StatsHandler.cpp | 2 +- src/osgDB/ConvertUTF.cpp | 6 ++ src/osgDB/DatabasePager.cpp | 2 +- src/osgDB/DatabaseRevisions.cpp | 9 +- src/osgDB/ImagePager.cpp | 6 +- src/osgDB/Registry.cpp | 26 +++--- src/osgDB/XmlParser.cpp | 2 +- src/osgGA/CameraManipulator.cpp | 3 +- src/osgGA/Device.cpp | 2 +- src/osgGA/FirstPersonManipulator.cpp | 7 +- src/osgGA/FlightManipulator.cpp | 9 +- src/osgGA/MultiTouchTrackballManipulator.cpp | 2 +- src/osgGA/NodeTrackerManipulator.cpp | 5 +- src/osgGA/OrbitManipulator.cpp | 7 +- src/osgGA/StandardManipulator.cpp | 27 +++--- src/osgGA/TerrainManipulator.cpp | 5 +- src/osgGA/TrackballManipulator.cpp | 3 +- src/osgParticle/SinkOperator.cpp | 16 ++-- src/osgPlugins/osg/AsciiStreamOperator.h | 6 +- src/osgPlugins/osg/BinaryStreamOperator.h | 8 +- src/osgPlugins/osg/XmlStreamOperator.h | 6 +- src/osgPresentation/KeyEventHandler.cpp | 2 +- src/osgPresentation/PropertyManager.cpp | 28 +++---- src/osgPresentation/SlideEventHandler.cpp | 36 ++++---- src/osgPresentation/SlideShowConstructor.cpp | 78 ++++++++--------- src/osgQt/GraphicsWindowQt.cpp | 14 ++-- src/osgQt/QFontImplementation.cpp | 2 +- src/osgQt/QWidgetImage.cpp | 2 +- src/osgShadow/ConvexPolyhedron.cpp | 4 +- src/osgShadow/DebugShadowMap.cpp | 9 ++ src/osgShadow/MinimalShadowMap.cpp | 2 +- src/osgShadow/ViewDependentShadowMap.cpp | 10 +-- src/osgTerrain/Layer.cpp | 14 ++-- src/osgTerrain/TerrainTechnique.cpp | 2 +- src/osgText/DefaultFont.h | 22 ++--- src/osgText/Style.cpp | 2 +- src/osgUtil/CullVisitor.cpp | 1 + src/osgUtil/DelaunayTriangulator.cpp | 2 +- src/osgUtil/PolytopeIntersector.cpp | 6 +- src/osgUtil/SceneGraphBuilder.cpp | 2 +- src/osgUtil/SmoothingVisitor.cpp | 1 + src/osgUtil/Tessellator.cpp | 2 +- src/osgViewer/CompositeViewer.cpp | 58 ++++++------- src/osgViewer/Keystone.cpp | 7 +- src/osgViewer/PixelBufferX11.cpp | 4 +- src/osgViewer/Renderer.cpp | 20 ++--- src/osgViewer/ScreenCaptureHandler.cpp | 4 +- src/osgViewer/Viewer.cpp | 34 ++++---- src/osgVolume/FixedFunctionTechnique.cpp | 2 +- src/osgVolume/Layer.cpp | 5 +- src/osgVolume/Locator.cpp | 2 +- src/osgVolume/RayTracedTechnique.cpp | 2 +- src/osgWidget/Browser.cpp | 2 +- src/osgWidget/Canvas.cpp | 2 +- src/osgWidget/Frame.cpp | 8 +- src/osgWidget/Input.cpp | 8 +- src/osgWidget/Lua.cpp | 2 + src/osgWidget/Python.cpp | 2 + src/osgWidget/StyleManager.cpp | 12 +-- src/osgWidget/ViewerEventHandlers.cpp | 28 +++---- src/osgWidget/Window.cpp | 4 +- src/osgWidget/WindowManager.cpp | 6 +- 100 files changed, 496 insertions(+), 428 deletions(-) diff --git a/include/OpenThreads/Exports b/include/OpenThreads/Exports index 9331f0ebe..8a935ec73 100644 --- a/include/OpenThreads/Exports +++ b/include/OpenThreads/Exports @@ -39,6 +39,10 @@ #endif #endif +#ifndef OT_UNUSED + #define OT_UNUSED(var) (void) var +#endif + #endif diff --git a/include/osg/BufferObject b/include/osg/BufferObject index ae00000a0..706c040a2 100644 --- a/include/osg/BufferObject +++ b/include/osg/BufferObject @@ -696,9 +696,9 @@ class OSG_EXPORT BufferData : public Object unsigned int getNumClients() const { return _numClients; } - void addClient(osg::Object *client) { ++_numClients; } + void addClient(osg::Object * /*client*/) { ++_numClients; } - void removeClient(osg::Object *client) { --_numClients; } + void removeClient(osg::Object */*client*/) { --_numClients; } protected: diff --git a/include/osg/Export b/include/osg/Export index 7fd42bfbd..86ff71c25 100644 --- a/include/osg/Export +++ b/include/osg/Export @@ -60,6 +60,12 @@ #endif #endif +#ifndef OSG_UNUSED + #define OSG_UNUSED(var) (void) var +#endif + + + /** \namespace osg diff --git a/include/osg/ImageStream b/include/osg/ImageStream index c805e4e43..f0fc2358a 100644 --- a/include/osg/ImageStream +++ b/include/osg/ImageStream @@ -92,22 +92,22 @@ class OSG_EXPORT ImageStream : public Image virtual void setVolume(float) {} virtual float getVolume() const { return 0.0f; } - + /// set the balance of the audio: -1 = left, 0 = center, 1 = right virtual float getAudioBalance() { return 0.0f; } - virtual void setAudioBalance(float b) {} + virtual void setAudioBalance(float /*b*/) {} typedef std::vector< osg::ref_ptr > AudioStreams; void setAudioStreams(const AudioStreams& asl) { _audioStreams = asl; } AudioStreams& getAudioStreams() { return _audioStreams; } const AudioStreams& getAudioStreams() const { return _audioStreams; } - + /** create a suitable texture for this imagestream, return NULL, if not supported * implement this method in subclasses to use special technologies like CoreVideo * or similar. */ virtual osg::Texture* createSuitableTexture() { return NULL; } - + protected: virtual void applyLoopingMode() {} diff --git a/include/osg/TextureBuffer b/include/osg/TextureBuffer index c9ef66dbc..ef067a202 100644 --- a/include/osg/TextureBuffer +++ b/include/osg/TextureBuffer @@ -24,7 +24,7 @@ #define GL_MAX_TEXTURE_BUFFER_SIZE_ARB 0x8C2B #define GL_TEXTURE_BINDING_BUFFER_ARB 0x8C2C #define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB 0x8C2D - #define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E + #define GL_TEXTURE_BUFFER_FORMAT_ARB 0x8C2E #endif namespace osg { @@ -87,15 +87,15 @@ class OSG_EXPORT TextureBuffer : public Texture virtual int getTextureWidth() const { return _textureWidth; } virtual int getTextureHeight() const { return 1; } virtual int getTextureDepth() const { return 1; } - + inline void setUsageHint( GLenum usageHint ) { _usageHint=usageHint; } inline GLenum getUsageHint() const { return _usageHint; } - virtual void allocateMipmap(State& state) const {}; + virtual void allocateMipmap(State& /*state*/) const {}; /** Bind the texture buffer.*/ virtual void apply(State& state) const; - + /** Bind buffer to different target. */ void bindBufferAs(unsigned int contextID, GLenum target); void unbindBufferAs(unsigned int contextID, GLenum target); @@ -113,11 +113,11 @@ class OSG_EXPORT TextureBuffer : public Texture typedef buffered_value ImageModifiedCount; mutable ImageModifiedCount _modifiedCount; - + class TextureBufferObject : public osg::Referenced { public: - TextureBufferObject(unsigned int contextID, GLenum usageHint) : + TextureBufferObject(unsigned int contextID, GLenum usageHint) : _id(0), _usageHint(usageHint) { @@ -126,7 +126,7 @@ class OSG_EXPORT TextureBuffer : public Texture void bindBuffer(GLenum target); void unbindBuffer(GLenum target); - + void texBuffer(GLenum internalFormat); void bufferData( osg::Image* image ); void bufferSubData( osg::Image* image ); @@ -136,8 +136,8 @@ class OSG_EXPORT TextureBuffer : public Texture GLenum _usageHint; osg::GLBufferObject::Extensions* _extensions; }; - - typedef osg::buffered_object > TextureBufferObjectList; + + typedef osg::buffered_object > TextureBufferObjectList; mutable TextureBufferObjectList _textureBufferObjects; }; diff --git a/include/osg/ValueObject b/include/osg/ValueObject index b65b1e331..d6ec0bd39 100644 --- a/include/osg/ValueObject +++ b/include/osg/ValueObject @@ -44,55 +44,55 @@ class ValueObject : public Object class GetValueVisitor { public: - virtual void apply(bool value) {} - virtual void apply(char value) {} - virtual void apply(unsigned char value) {} - virtual void apply(short value) {} - virtual void apply(unsigned short value) {} - virtual void apply(int value) {} - virtual void apply(unsigned int value) {} - virtual void apply(float value) {} - virtual void apply(double value) {} - virtual void apply(const std::string& value) {} - virtual void apply(const osg::Vec2f& value) {} - virtual void apply(const osg::Vec3f& value) {} - virtual void apply(const osg::Vec4f& value) {} - virtual void apply(const osg::Vec2d& value) {} - virtual void apply(const osg::Vec3d& value) {} - virtual void apply(const osg::Vec4d& value) {} - virtual void apply(const osg::Quat& value) {} - virtual void apply(const osg::Plane& value) {} - virtual void apply(const osg::Matrixf& value) {} - virtual void apply(const osg::Matrixd& value) {} + virtual void apply(bool /*value*/) {} + virtual void apply(char /*value*/) {} + virtual void apply(unsigned char /*value*/) {} + virtual void apply(short /*value*/) {} + virtual void apply(unsigned short /*value*/) {} + virtual void apply(int /*value*/) {} + virtual void apply(unsigned int /*value*/) {} + virtual void apply(float /*value*/) {} + virtual void apply(double /*value*/) {} + virtual void apply(const std::string& /*value*/) {} + virtual void apply(const osg::Vec2f& /*value*/) {} + virtual void apply(const osg::Vec3f& /*value*/) {} + virtual void apply(const osg::Vec4f& /*value*/) {} + virtual void apply(const osg::Vec2d& /*value*/) {} + virtual void apply(const osg::Vec3d& /*value*/) {} + virtual void apply(const osg::Vec4d& /*value*/) {} + virtual void apply(const osg::Quat& /*value*/) {} + virtual void apply(const osg::Plane& /*value*/) {} + virtual void apply(const osg::Matrixf& /*value*/) {} + virtual void apply(const osg::Matrixd& /*value*/) {} }; class SetValueVisitor { public: - virtual void apply(bool& value) {} - virtual void apply(char& value) {} - virtual void apply(unsigned char& value) {} - virtual void apply(short& value) {} - virtual void apply(unsigned short& value) {} - virtual void apply(int& value) {} - virtual void apply(unsigned int& value) {} - virtual void apply(float& value) {} - virtual void apply(double& value) {} - virtual void apply(std::string& value) {} - virtual void apply(osg::Vec2f& value) {} - virtual void apply(osg::Vec3f& value) {} - virtual void apply(osg::Vec4f& value) {} - virtual void apply(osg::Vec2d& value) {} - virtual void apply(osg::Vec3d& value) {} - virtual void apply(osg::Vec4d& value) {} - virtual void apply(osg::Quat& value) {} - virtual void apply(osg::Plane& value) {} - virtual void apply(osg::Matrixf& value) {} - virtual void apply(osg::Matrixd& value) {} + virtual void apply(bool& /*value*/) {} + virtual void apply(char& /*value*/) {} + virtual void apply(unsigned char& /*value*/) {} + virtual void apply(short& /*value*/) {} + virtual void apply(unsigned short& /*value*/) {} + virtual void apply(int& /*value*/) {} + virtual void apply(unsigned int& /*value*/) {} + virtual void apply(float& /*value*/) {} + virtual void apply(double& /*value*/) {} + virtual void apply(std::string& /*value*/) {} + virtual void apply(osg::Vec2f& /*value*/) {} + virtual void apply(osg::Vec3f& /*value*/) {} + virtual void apply(osg::Vec4f& /*value*/) {} + virtual void apply(osg::Vec2d& /*value*/) {} + virtual void apply(osg::Vec3d& /*value*/) {} + virtual void apply(osg::Vec4d& /*value*/) {} + virtual void apply(osg::Quat& /*value*/) {} + virtual void apply(osg::Plane& /*value*/) {} + virtual void apply(osg::Matrixf& /*value*/) {} + virtual void apply(osg::Matrixd& /*value*/) {} }; - virtual bool get(GetValueVisitor& gvv) const { return false; } - virtual bool set(SetValueVisitor& gvv) { return false; } + virtual bool get(GetValueVisitor& /*gvv*/) const { return false; } + virtual bool set(SetValueVisitor& /*gvv*/) { return false; } protected: virtual ~ValueObject() {} }; diff --git a/include/osgAnimation/Action b/include/osgAnimation/Action index f389da893..7b2be26d2 100644 --- a/include/osgAnimation/Action +++ b/include/osgAnimation/Action @@ -46,7 +46,7 @@ namespace osgAnimation META_Object(osgAnimation,Callback); - virtual void operator()(Action* action, osgAnimation::ActionVisitor* nv) {} + virtual void operator()(Action* /*action*/, osgAnimation::ActionVisitor* /*nv*/) {} Callback* getNestedCallback() { return _nestedCallback.get(); } void addNestedCallback(Callback* callback) @@ -119,7 +119,7 @@ namespace osgAnimation // get the number of loop, the frame relative to loop. // return true if in range, and false if out of range. bool evaluateFrame(unsigned int frame, unsigned int& resultframe, unsigned int& nbloop ); - virtual void traverse(ActionVisitor& visitor) {} + virtual void traverse(ActionVisitor& /*visitor*/) {} //virtual void evaluate(unsigned int frame); protected: diff --git a/include/osgAnimation/AnimationUpdateCallback b/include/osgAnimation/AnimationUpdateCallback index 83763beea..2db6561b8 100644 --- a/include/osgAnimation/AnimationUpdateCallback +++ b/include/osgAnimation/AnimationUpdateCallback @@ -42,7 +42,7 @@ namespace osgAnimation META_Object(osgAnimation, AnimationUpdateCallback); const std::string& getName() const { return T::getName(); } - bool link(Channel* channel) { return 0; } + bool link(Channel* /*channel*/) { return 0; } int link(Animation* animation) { if (T::getName().empty()) diff --git a/include/osgAnimation/MorphGeometry b/include/osgAnimation/MorphGeometry index 3aea0261a..48e384201 100644 --- a/include/osgAnimation/MorphGeometry +++ b/include/osgAnimation/MorphGeometry @@ -40,7 +40,7 @@ namespace osgAnimation public: MorphTarget(osg::Geometry* geom, float w = 1.0) : _geom(geom), _weight(w) {} void setWeight(float weight) { _weight = weight; } - const float getWeight() const { return _weight; } + float getWeight() const { return _weight; } osg::Geometry* getGeometry() { return _geom.get(); } const osg::Geometry* getGeometry() const { return _geom.get(); } void setGeometry(osg::Geometry* geom) { _geom = geom; } diff --git a/include/osgDB/DatabaseRevisions b/include/osgDB/DatabaseRevisions index e324829eb..d0df00976 100644 --- a/include/osgDB/DatabaseRevisions +++ b/include/osgDB/DatabaseRevisions @@ -27,7 +27,7 @@ class OSGDB_EXPORT FileList : public osg::Object public: FileList(); - FileList(const FileList& fileList, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY); + FileList(const FileList& fileList, const osg::CopyOp & copyop=osg::CopyOp::SHALLOW_COPY); META_Object(osgDB, FileList) @@ -58,7 +58,7 @@ class OSGDB_EXPORT DatabaseRevision : public osg::Object public: DatabaseRevision(); - DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY); + DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp & copyop=osg::CopyOp::SHALLOW_COPY); META_Object(osgDB, DatabaseRevision) @@ -99,7 +99,7 @@ class OSGDB_EXPORT DatabaseRevisions : public osg::Object public: DatabaseRevisions(); - DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp=osg::CopyOp::SHALLOW_COPY); + DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp & copyop=osg::CopyOp::SHALLOW_COPY); META_Object(osgDB, DatabaseRevisions) diff --git a/include/osgGA/GUIEventAdapter b/include/osgGA/GUIEventAdapter index 22fa06127..08620ee34 100644 --- a/include/osgGA/GUIEventAdapter +++ b/include/osgGA/GUIEventAdapter @@ -31,7 +31,7 @@ struct PointerData : public osg::Referenced y(0.0f), yMin(-1.0f), yMax(1.0f) {} - + PointerData(osg::Object* obj, float in_x, float in_xMin, float in_xMax, float in_y, float in_yMin, float in_yMax): object(obj), x(in_x), @@ -40,8 +40,9 @@ struct PointerData : public osg::Referenced y(in_y), yMin(in_yMin), yMax(in_yMax) {} - + PointerData(const PointerData& pd): + osg::Referenced(), object(pd.object), x(pd.x), xMin(pd.xMin), @@ -49,11 +50,11 @@ struct PointerData : public osg::Referenced y(pd.y), yMin(pd.yMin), yMax(pd.yMax) {} - + PointerData& operator = (const PointerData& pd) { if (&pd==this) return *this; - + object = pd.object; x = pd.x; xMin = pd.xMin; @@ -61,19 +62,19 @@ struct PointerData : public osg::Referenced y = pd.y; yMin = pd.yMin; yMax = pd.yMax; - + return *this; } - + osg::observer_ptr object; float x, xMin, xMax; float y, yMin, yMax; - + float getXnormalized() const { return (x-xMin)/(xMax-xMin)*2.0f-1.0f; } float getYnormalized() const { return (y-yMin)/(yMax-yMin)*2.0f-1.0f; } }; - + /** Event class for storing Keyboard, mouse and window events. */ class OSGGA_EXPORT GUIEventAdapter : public osg::Object @@ -383,7 +384,7 @@ public: class TouchData : public osg::Object { public: - + struct TouchPoint { unsigned int id; TouchPhase phase; @@ -407,14 +408,14 @@ public: typedef TouchSet::const_iterator const_iterator; TouchData() : osg::Object() {} - + TouchData(const TouchData& td, const osg::CopyOp& copyop): osg::Object(td,copyop), _touches(td._touches) {} - + META_Object(osgGA, TouchData); - + unsigned int getNumTouchPoints() const { return static_cast(_touches.size()); } @@ -533,7 +534,7 @@ public: /** set mouse minimum x. */ void setXmin(float v) { _Xmin = v; } - + /** get mouse minimum x. */ float getXmin() const { return _Xmin; } @@ -570,7 +571,7 @@ public: #if 1 inline float getXnormalized() const { - return _pointerDataList.size()>=1 ? + return _pointerDataList.size()>=1 ? _pointerDataList[_pointerDataList.size()-1]->getXnormalized(): 2.0f*(getX()-getXmin())/(getXmax()-getXmin())-1.0f; } @@ -685,7 +686,7 @@ public: TouchData* getTouchData() const { return _touchData.get(); } bool isMultiTouchEvent() const { return (_touchData.valid()); } - + typedef std::vector< osg::ref_ptr > PointerDataList; void setPointerDataList(const PointerDataList& pdl) { _pointerDataList = pdl; } PointerDataList& getPointerDataList() { return _pointerDataList; } @@ -698,7 +699,7 @@ public: PointerData* getPointerData(osg::Object* obj) { for(unsigned int i=0;i<_pointerDataList.size(); ++i) { if (_pointerDataList[i]->object==obj) return _pointerDataList[i].get(); } return 0; } const PointerData* getPointerData(osg::Object* obj) const { for(unsigned int i=0;i<_pointerDataList.size(); ++i) { if (_pointerDataList[i]->object==obj) return _pointerDataList[i].get(); } return 0; } void addPointerData(PointerData* pd) { _pointerDataList.push_back(pd); } - + void copyPointerDataFrom(const osgGA::GUIEventAdapter& sourceEvent); protected: diff --git a/include/osgManipulator/Constraint b/include/osgManipulator/Constraint index f9cad9e54..2e18cf8da 100644 --- a/include/osgManipulator/Constraint +++ b/include/osgManipulator/Constraint @@ -38,7 +38,7 @@ class DraggerCallback : virtual public osg::Object DraggerCallback(): osg::Object(true) {} - DraggerCallback(const DraggerCallback&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY): + DraggerCallback(const DraggerCallback&, const osg::CopyOp& /*copyop*/ = osg::CopyOp::SHALLOW_COPY): osg::Object(true) {} META_Object(osgManipulator, DraggerCallback); diff --git a/include/osgParticle/DomainOperator b/include/osgParticle/DomainOperator index 9c58c42fb..e35c81e57 100644 --- a/include/osgParticle/DomainOperator +++ b/include/osgParticle/DomainOperator @@ -120,14 +120,14 @@ protected: virtual ~DomainOperator() {} DomainOperator& operator=( const DomainOperator& ) { return *this; } - virtual void handlePoint( const Domain& domain, Particle* P, double dt ) { ignore("Point"); } - virtual void handleLineSegment( const Domain& domain, Particle* P, double dt ) { ignore("LineSegment"); } - virtual void handleTriangle( const Domain& domain, Particle* P, double dt ) { ignore("Triangle"); } - virtual void handleRectangle( const Domain& domain, Particle* P, double dt ) { ignore("Rectangle"); } - virtual void handlePlane( const Domain& domain, Particle* P, double dt ) { ignore("Plane"); } - virtual void handleSphere( const Domain& domain, Particle* P, double dt ) { ignore("Sphere"); } - virtual void handleBox( const Domain& domain, Particle* P, double dt ) { ignore("Box"); } - virtual void handleDisk( const Domain& domain, Particle* P, double dt ) { ignore("Disk"); } + virtual void handlePoint( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Point"); } + virtual void handleLineSegment( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("LineSegment"); } + virtual void handleTriangle( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Triangle"); } + virtual void handleRectangle( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Rectangle"); } + virtual void handlePlane( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Plane"); } + virtual void handleSphere( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Sphere"); } + virtual void handleBox( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Box"); } + virtual void handleDisk( const Domain& /*domain*/, Particle* /*P*/, double /*dt*/ ) { ignore("Disk"); } inline void computeNewBasis( const osg::Vec3&, const osg::Vec3&, osg::Vec3&, osg::Vec3& ); inline void ignore( const std::string& func ); diff --git a/include/osgQt/QFontImplementation b/include/osgQt/QFontImplementation index 1fc362564..4bc45dc7e 100644 --- a/include/osgQt/QFontImplementation +++ b/include/osgQt/QFontImplementation @@ -34,7 +34,7 @@ public: virtual osgText::Glyph* getGlyph(const osgText::FontResolution& fontRes, unsigned int charcode); - virtual osgText::Glyph3D* getGlyph3D(unsigned int charcode) { return 0; } + virtual osgText::Glyph3D* getGlyph3D(unsigned int /*charcode*/) { return 0; } virtual osg::Vec2 getKerning(unsigned int leftcharcode, unsigned int rightcharcode, osgText::KerningType kerningType); diff --git a/include/osgSim/ShapeAttribute b/include/osgSim/ShapeAttribute index cb9ae29c2..2561d07d8 100644 --- a/include/osgSim/ShapeAttribute +++ b/include/osgSim/ShapeAttribute @@ -62,7 +62,7 @@ class OSGSIM_EXPORT ShapeAttribute void setName(const std::string& name) { _name = name; } /// Get the attribute data type. - const Type getType() const { return _type; } + Type getType() const { return _type; } /// Get the attribute data as an int. int getInt() const { return _integer; } diff --git a/include/osgText/Font b/include/osgText/Font index 01c284d54..6ca770749 100644 --- a/include/osgText/Font +++ b/include/osgText/Font @@ -241,7 +241,7 @@ public: Font* _facade; - virtual bool getVerticalSize(float & ascender, float & descender) const { return false; } + virtual bool getVerticalSize(float & /*ascender*/, float & /*descender*/) const { return false; } }; diff --git a/include/osgVolume/Locator b/include/osgVolume/Locator index 2b5a2b61f..338fe7178 100644 --- a/include/osgVolume/Locator +++ b/include/osgVolume/Locator @@ -73,7 +73,7 @@ class OSGVOLUME_EXPORT Locator : public osg::Object LocatorCallback(const LocatorCallback& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): osg::Object(rhs,copyop) {} META_Object(osgVolume, LocatorCallback); - virtual void locatorModified(Locator* locator) {}; + virtual void locatorModified(Locator* /*locator*/) {}; protected: virtual ~LocatorCallback() {} diff --git a/src/OpenThreads/pthreads/PThread.cpp b/src/OpenThreads/pthreads/PThread.cpp index 60d1dde51..9821a18a0 100644 --- a/src/OpenThreads/pthreads/PThread.cpp +++ b/src/OpenThreads/pthreads/PThread.cpp @@ -1,13 +1,13 @@ /* -*-c++-*- OpenThreads library, Copyright (C) 2002 - 2007 The Open Thread Group * - * This library is open source and may be redistributed and/or modified under - * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. - * + * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ @@ -238,7 +238,8 @@ private: } fflush(stdout); - +#else // ] ALLOW_PRIORITY_SCHEDULING + OT_UNUSED(thread); #endif // ] ALLOW_PRIORITY_SCHEDULING } @@ -346,6 +347,8 @@ private: } +#else // ] ALLOW_PRIORITY_SCHEDULING + OT_UNUSED(thread); #endif // ] ALLOW_PRIORITY_SCHEDULING return status; @@ -366,6 +369,7 @@ int Thread::SetConcurrency(int concurrencyLevel) #if defined (HAVE_PTHREAD_SETCONCURRENCY) return pthread_setconcurrency(concurrencyLevel); #else + OT_UNUSED(concurrencyLevel); return -1; #endif @@ -436,7 +440,7 @@ Thread::~Thread() } delete pd; - + _prvData = 0; } @@ -550,7 +554,7 @@ int Thread::setProcessorAffinity(unsigned int cpunum) PThreadPrivateData *pd = static_cast (_prvData); pd->cpunum = cpunum; if (pd->cpunum<0) return -1; - + #ifdef __sgi int status; @@ -692,7 +696,7 @@ int Thread::start() { // int Thread::startThread() { - if (_prvData) return start(); + if (_prvData) return start(); else return 0; } @@ -839,6 +843,7 @@ int Thread::setSchedulePriority(ThreadPriority priority) { return 0; #else + OT_UNUSED(priority); return -1; #endif @@ -878,6 +883,7 @@ int Thread::setSchedulePolicy(ThreadPolicy policy) else return 0; #else + OT_UNUSED(policy); return -1; #endif @@ -1009,7 +1015,7 @@ int OpenThreads::GetNumberOfProcessors() uint64_t num_cpus = 0; size_t num_cpus_length = sizeof(num_cpus); #if defined(__FreeBSD__) - sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0); + sysctlbyname("hw.ncpu", &num_cpus, &num_cpus_length, NULL, 0); #else sysctlbyname("hw.activecpu", &num_cpus, &num_cpus_length, NULL, 0); #endif @@ -1024,7 +1030,7 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum) Thread::Init(); Thread* thread = Thread::CurrentThread(); - if (thread) + if (thread) { return thread->setProcessorAffinity(cpunum); } @@ -1046,6 +1052,6 @@ int OpenThreads::SetProcessorAffinityOfCurrentThread(unsigned int cpunum) #endif #endif } - + return -1; } diff --git a/src/osg/BufferObject.cpp b/src/osg/BufferObject.cpp index 33112525f..ac276c17f 100644 --- a/src/osg/BufferObject.cpp +++ b/src/osg/BufferObject.cpp @@ -347,7 +347,7 @@ void GLBufferObject::Extensions::setupGLExtensions(unsigned int contextID) setGLExtensionFuncPtr(_glBindBufferRange, "glBindBufferRange"); setGLExtensionFuncPtr(_glBindBufferBase, "glBindBufferBase"); setGLExtensionFuncPtr(_glTexBuffer, "glTexBuffer","glTexBufferARB" ); - + _isPBOSupported = OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object"); _isUniformBufferObjectSupported = osg::isGLExtensionSupported(contextID, "GL_ARB_uniform_buffer_object"); _isTBOSupported = osg::isGLExtensionSupported(contextID,"GL_ARB_texture_buffer_object"); @@ -687,7 +687,7 @@ void GLBufferObjectSet::discardAllDeletedGLBufferObjects() _orphanedGLBufferObjects.clear(); } -void GLBufferObjectSet::flushDeletedGLBufferObjects(double currentTime, double& availableTime) +void GLBufferObjectSet::flushDeletedGLBufferObjects(double /*currentTime*/, double& availableTime) { { OpenThreads::ScopedLock lock(_mutex); diff --git a/src/osg/GraphicsCostEstimator.cpp b/src/osg/GraphicsCostEstimator.cpp index 8c40187d7..f835cb57c 100644 --- a/src/osg/GraphicsCostEstimator.cpp +++ b/src/osg/GraphicsCostEstimator.cpp @@ -45,7 +45,7 @@ void GeometryCostEstimator::setDefaults() _displayListCompileFactor = 10.0; } -void GeometryCostEstimator::calibrate(osg::RenderInfo& renderInfo) +void GeometryCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/) { } @@ -91,7 +91,7 @@ CostPair GeometryCostEstimator::estimateCompileCost(const osg::Geometry* geometr } } -CostPair GeometryCostEstimator::estimateDrawCost(const osg::Geometry* geometry) const +CostPair GeometryCostEstimator::estimateDrawCost(const osg::Geometry* /*geometry*/) const { return CostPair(0.0,0.0); } @@ -114,7 +114,7 @@ void TextureCostEstimator::setDefaults() _drawCost.set(min_time, 1.0/gpu_bandwidth, 256); // min time 1/10th of millisecond, min size 256 } -void TextureCostEstimator::calibrate(osg::RenderInfo& renderInfo) +void TextureCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/) { } @@ -130,7 +130,7 @@ CostPair TextureCostEstimator::estimateCompileCost(const osg::Texture* texture) return cost; } -CostPair TextureCostEstimator::estimateDrawCost(const osg::Texture* texture) const +CostPair TextureCostEstimator::estimateDrawCost(const osg::Texture* /*texture*/) const { return CostPair(0.0,0.0); } @@ -147,16 +147,16 @@ void ProgramCostEstimator::setDefaults() { } -void ProgramCostEstimator::calibrate(osg::RenderInfo& renderInfo) +void ProgramCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/) { } -CostPair ProgramCostEstimator::estimateCompileCost(const osg::Program* program) const +CostPair ProgramCostEstimator::estimateCompileCost(const osg::Program* /*program*/) const { return CostPair(0.0,0.0); } -CostPair ProgramCostEstimator::estimateDrawCost(const osg::Program* program) const +CostPair ProgramCostEstimator::estimateDrawCost(const osg::Program* /*program*/) const { return CostPair(0.0,0.0); } @@ -185,7 +185,7 @@ void GraphicsCostEstimator::setDefaults() } -void GraphicsCostEstimator::calibrate(osg::RenderInfo& renderInfo) +void GraphicsCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/) { OSG_INFO<<"GraphicsCostEstimator::calibrate(..)"<next->prev = node->prev; node->prev->next = node->next; diff --git a/src/osg/glu/libtess/memalloc.cpp b/src/osg/glu/libtess/memalloc.cpp index 81879ef78..b4527ea2c 100644 --- a/src/osg/glu/libtess/memalloc.cpp +++ b/src/osg/glu/libtess/memalloc.cpp @@ -35,7 +35,7 @@ #include "memalloc.h" #include "string.h" -int __gl_memInit( size_t maxFast ) +int __gl_memInit( size_t /*maxFast*/ ) { #ifndef NO_MALLOPT /* mallopt( M_MXFAST, maxFast );*/ diff --git a/src/osg/glu/libutil/mipmap.cpp b/src/osg/glu/libutil/mipmap.cpp index 7292afb80..c9e05ca56 100644 --- a/src/osg/glu/libutil/mipmap.cpp +++ b/src/osg/glu/libutil/mipmap.cpp @@ -3293,7 +3293,7 @@ static void scale_internal_float(GLint components, GLint widthin, } } -static int checkMipmapArgs(GLenum internalFormat, GLenum format, GLenum type) +static int checkMipmapArgs(GLenum /*internalFormat*/, GLenum format, GLenum type) { if (!legalFormat(format) || !legalType(type)) { return GLU_INVALID_ENUM; @@ -3344,7 +3344,7 @@ static GLboolean legalType(GLenum type) case GL_UNSIGNED_INT: case GL_FLOAT: case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: + case GL_UNSIGNED_BYTE_2_3_3_REV: case GL_UNSIGNED_SHORT_5_6_5: case GL_UNSIGNED_SHORT_5_6_5_REV: case GL_UNSIGNED_SHORT_4_4_4_4: @@ -3442,7 +3442,7 @@ static void closestFit(GLenum target, GLint width, GLint height, if ( (strtod((const char *)glGetString(GL_VERSION),NULL) >= 1.1) ) { GLint widthPowerOf2= nearestPower(width); - GLint heightPowerOf2= nearestPower(height); + GLint heightPowerOf2= nearestPower(height); GLint proxyWidth; do { @@ -4613,7 +4613,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat, } } /* for level */ glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment); - + #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); @@ -4905,7 +4905,7 @@ static GLfloat bytes_per_element(GLenum type) case GL_FLOAT: return(sizeof(GLfloat)); case GL_UNSIGNED_BYTE_3_3_2: - case GL_UNSIGNED_BYTE_2_3_3_REV: + case GL_UNSIGNED_BYTE_2_3_3_REV: return(sizeof(GLubyte)); case GL_UNSIGNED_SHORT_5_6_5: case GL_UNSIGNED_SHORT_5_6_5_REV: @@ -6220,7 +6220,7 @@ static void scaleInternalPackedPixel(int components, #endif /* calculate the value for pixels in the last row */ - + y_percent = highy_float; percent = y_percent * (1-lowx_float); temp = (const char *)dataIn + xindex + highy_int * rowSizeInBytes; @@ -7427,13 +7427,13 @@ int gluScaleImage3D(GLenum format, static void closestFit3D(GLTexImage3DProc gluTexImage3D, - GLenum target, GLint width, GLint height, GLint depth, + GLenum /*target*/, GLint width, GLint height, GLint depth, GLint internalFormat, GLenum format, GLenum type, GLint *newWidth, GLint *newHeight, GLint *newDepth) { #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) GLint widthPowerOf2= nearestPower(width); - GLint heightPowerOf2= nearestPower(height); + GLint heightPowerOf2= nearestPower(height); GLint depthPowerOf2= nearestPower(depth); GLint proxyWidth; @@ -7534,7 +7534,7 @@ static void halveImagePackedPixelSlice(int components, } totals[cc]/= (float)BOX2; } /* for cc */ - + (*shovePackedPixel)(totals,outIndex,dataOut); outIndex++; /* skip over to next group of 2 */ @@ -8280,7 +8280,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D, } } /* level userLevel is in srcImage; nothing saved yet */ - level = userLevel; + level = userLevel; } #if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE) diff --git a/src/osgAnimation/AnimationManagerBase.cpp b/src/osgAnimation/AnimationManagerBase.cpp index 9f2d2b294..06ce5756f 100644 --- a/src/osgAnimation/AnimationManagerBase.cpp +++ b/src/osgAnimation/AnimationManagerBase.cpp @@ -62,7 +62,7 @@ void AnimationManagerBase::operator()(osg::Node* node, osg::NodeVisitor* nv) } -AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) : osg::NodeCallback(b,copyop) +AnimationManagerBase::AnimationManagerBase(const AnimationManagerBase& b, const osg::CopyOp& copyop) : osg::Object(b, copyop), osg::NodeCallback(b,copyop) // TODO check this { const AnimationList& animationList = b.getAnimationList(); for (AnimationList::const_iterator it = animationList.begin(); diff --git a/src/osgAnimation/Skeleton.cpp b/src/osgAnimation/Skeleton.cpp index e83162c1b..9bc09ab72 100644 --- a/src/osgAnimation/Skeleton.cpp +++ b/src/osgAnimation/Skeleton.cpp @@ -41,7 +41,7 @@ class ValidateSkeletonVisitor : public osg::NodeVisitor { public: ValidateSkeletonVisitor(): osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {} - void apply(osg::Node& node) { return; } + void apply(osg::Node& /*node*/) { return; } void apply(osg::Transform& node) { // the idea is to traverse the skeleton or bone but to stop if other node is found diff --git a/src/osgAnimation/StackedMatrixElement.cpp b/src/osgAnimation/StackedMatrixElement.cpp index a26990169..e8d403237 100644 --- a/src/osgAnimation/StackedMatrixElement.cpp +++ b/src/osgAnimation/StackedMatrixElement.cpp @@ -33,7 +33,7 @@ Target* StackedMatrixElement::getOrCreateTarget() return _target.get(); } -void StackedMatrixElement::update(float t) +void StackedMatrixElement::update(float /*t*/) { if (_target.valid()) _matrix = _target->getValue(); diff --git a/src/osgAnimation/StackedQuaternionElement.cpp b/src/osgAnimation/StackedQuaternionElement.cpp index ca12c2265..e98385b26 100644 --- a/src/osgAnimation/StackedQuaternionElement.cpp +++ b/src/osgAnimation/StackedQuaternionElement.cpp @@ -37,7 +37,7 @@ void StackedQuaternionElement::applyToMatrix(osg::Matrix& matrix) const {matrix. osg::Matrix StackedQuaternionElement::getAsMatrix() const { return osg::Matrix(_quaternion); } bool StackedQuaternionElement::isIdentity() const { return (_quaternion[0] == 0 && _quaternion[1] == 0 && _quaternion[2] == 0 && _quaternion[3] == 1.0); } -void StackedQuaternionElement::update(float t) +void StackedQuaternionElement::update(float /*t*/) { if (_target.valid()) _quaternion = _target->getValue(); diff --git a/src/osgAnimation/StackedRotateAxisElement.cpp b/src/osgAnimation/StackedRotateAxisElement.cpp index c1bb5ffd3..7285fd2b2 100644 --- a/src/osgAnimation/StackedRotateAxisElement.cpp +++ b/src/osgAnimation/StackedRotateAxisElement.cpp @@ -27,7 +27,7 @@ StackedRotateAxisElement::StackedRotateAxisElement(const StackedRotateAxisElemen osg::Matrix StackedRotateAxisElement::getAsMatrix() const { return osg::Matrix::rotate(osg::Quat(_angle, _axis)); } -void StackedRotateAxisElement::update(float t) +void StackedRotateAxisElement::update(float /*t*/) { if (_target.valid()) _angle = _target->getValue(); diff --git a/src/osgAnimation/StackedScaleElement.cpp b/src/osgAnimation/StackedScaleElement.cpp index 71f7ceb90..a77a07303 100644 --- a/src/osgAnimation/StackedScaleElement.cpp +++ b/src/osgAnimation/StackedScaleElement.cpp @@ -42,7 +42,7 @@ StackedScaleElement::StackedScaleElement() _scale = osg::Vec3(1,1,1); } -void StackedScaleElement::update(float t) +void StackedScaleElement::update(float /*t*/) { if (_target.valid()) _scale = _target->getValue(); diff --git a/src/osgAnimation/StackedTransform.cpp b/src/osgAnimation/StackedTransform.cpp index 91ac2d842..77e99fe79 100644 --- a/src/osgAnimation/StackedTransform.cpp +++ b/src/osgAnimation/StackedTransform.cpp @@ -18,7 +18,8 @@ using namespace osgAnimation; StackedTransform::StackedTransform() {} -StackedTransform::StackedTransform(const StackedTransform& rhs, const osg::CopyOp& co) +StackedTransform::StackedTransform(const StackedTransform& rhs, const osg::CopyOp& co): + osg::MixinVector >(rhs) { reserve(rhs.size()); for (StackedTransform::const_iterator it = rhs.begin(); it != rhs.end(); ++it) diff --git a/src/osgAnimation/StackedTranslateElement.cpp b/src/osgAnimation/StackedTranslateElement.cpp index bbd54c11d..bf05ef341 100644 --- a/src/osgAnimation/StackedTranslateElement.cpp +++ b/src/osgAnimation/StackedTranslateElement.cpp @@ -43,7 +43,7 @@ Target* StackedTranslateElement::getOrCreateTarget() Target* StackedTranslateElement::getTarget() {return _target.get();} const Target* StackedTranslateElement::getTarget() const {return _target.get();} -void StackedTranslateElement::update(float t) +void StackedTranslateElement::update(float /*t*/) { if (_target.valid()) _translate = _target->getValue(); diff --git a/src/osgAnimation/StatsHandler.cpp b/src/osgAnimation/StatsHandler.cpp index 74fc8c0af..e282c4cda 100644 --- a/src/osgAnimation/StatsHandler.cpp +++ b/src/osgAnimation/StatsHandler.cpp @@ -109,7 +109,7 @@ struct StatsGraph : public osg::MatrixTransform struct NeverCull : public osg::Drawable::CullCallback { NeverCull() {} - bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const { return false;} + bool cull(osg::NodeVisitor* /*nv*/, osg::Drawable* /*drawable*/, osg::RenderInfo* /*renderInfo*/) const { return false;} }; diff --git a/src/osgDB/ConvertUTF.cpp b/src/osgDB/ConvertUTF.cpp index 1b5013a89..682d067bf 100644 --- a/src/osgDB/ConvertUTF.cpp +++ b/src/osgDB/ConvertUTF.cpp @@ -65,6 +65,8 @@ std::string convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength) #else //TODO: Implement for other platforms OSG_WARN << "ConvertUTF16toUTF8 not implemented." << std::endl; + OSG_UNUSED(source); + OSG_UNUSED(sourceLength); return std::string(); #endif } @@ -97,6 +99,8 @@ std::wstring convertUTF8toUTF16(const char* source, unsigned sourceLength) #else //TODO: Implement for other platforms OSG_WARN << "ConvertUTF8toUTF16 not implemented." << std::endl; + OSG_UNUSED(source); + OSG_UNUSED(sourceLength); return std::wstring(); #endif } @@ -126,6 +130,7 @@ std::string convertStringFromCurrentCodePageToUTF8(const char* source, unsigned return convertUTF16toUTF8(sUTF16); #else + OSG_UNUSED(sourceLength); return source; #endif } @@ -158,6 +163,7 @@ std::string convertStringFromUTF8toCurrentCodePage(const char* source, unsigned return sDest; #else + OSG_UNUSED(sourceLength); return source; #endif } diff --git a/src/osgDB/DatabasePager.cpp b/src/osgDB/DatabasePager.cpp index 1ae8ca720..661e42d79 100644 --- a/src/osgDB/DatabasePager.cpp +++ b/src/osgDB/DatabasePager.cpp @@ -111,7 +111,7 @@ struct DatabasePager::DatabasePagerCompileCompletedCallback : public osgUtil::In _pager(pager), _databaseRequest(databaseRequest) {} - virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* compileSet) + virtual bool compileCompleted(osgUtil::IncrementalCompileOperation::CompileSet* /*compileSet*/) { _pager->compileCompleted(_databaseRequest.get()); return true; diff --git a/src/osgDB/DatabaseRevisions.cpp b/src/osgDB/DatabaseRevisions.cpp index 36ffa4ff3..ad725b40a 100644 --- a/src/osgDB/DatabaseRevisions.cpp +++ b/src/osgDB/DatabaseRevisions.cpp @@ -27,7 +27,8 @@ FileList::FileList() { } -FileList::FileList(const FileList& fileList, const osg::CopyOp): +FileList::FileList(const FileList& fileList, const osg::CopyOp & copyop): + osg::Object(fileList, copyop), _files(fileList._files) { } @@ -64,7 +65,8 @@ DatabaseRevision::DatabaseRevision() { } -DatabaseRevision::DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp): +DatabaseRevision::DatabaseRevision(const DatabaseRevision& revision, const osg::CopyOp & copyop): + osg::Object(revision, copyop), _databasePath(revision._databasePath), _filesAdded(revision._filesAdded), _filesRemoved(revision._filesRemoved), @@ -109,7 +111,8 @@ DatabaseRevisions::DatabaseRevisions() { } -DatabaseRevisions::DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp): +DatabaseRevisions::DatabaseRevisions(const DatabaseRevisions& revisions, const osg::CopyOp & copyop): + osg::Object(revisions, copyop), _databasePath(revisions._databasePath), _revisionList(revisions._revisionList) { diff --git a/src/osgDB/ImagePager.cpp b/src/osgDB/ImagePager.cpp index 9c41de09d..9a760d4ec 100644 --- a/src/osgDB/ImagePager.cpp +++ b/src/osgDB/ImagePager.cpp @@ -81,7 +81,7 @@ void ImagePager::ReadQueue::clear() void ImagePager::ReadQueue::add(ImagePager::ImageRequest* imageRequest) { OpenThreads::ScopedLock lock(_requestMutex); - + _requestList.push_back(imageRequest); imageRequest->_requestQueue = this; @@ -221,7 +221,7 @@ void ImagePager::ImageThread::run() if (image.valid()) { // OSG_NOTICE<<" successful readImageFile("<_fileName<<") index to assign = "<_attachmentIndex<(imageRequest->_attachmentPoint.get()); if (is) { @@ -329,7 +329,7 @@ osg::Image* ImagePager::readImageFile(const std::string& fileName, const osg::Re return osgDB::readImageFile(fileName, readOptions); } -void ImagePager::requestImageFile(const std::string& fileName, osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* framestamp, osg::ref_ptr& imageRequest, const osg::Referenced* options) +void ImagePager::requestImageFile(const std::string& fileName, osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* /*framestamp*/, osg::ref_ptr& imageRequest, const osg::Referenced* options) { osgDB::Options* readOptions = dynamic_cast(const_cast(options)); diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp index 5d9dd9a3c..a193f0f07 100644 --- a/src/osgDB/Registry.cpp +++ b/src/osgDB/Registry.cpp @@ -346,7 +346,7 @@ Registry::Registry() addFileExtensionAlias("tga", "qt"); addFileExtensionAlias("flv", "qt"); addFileExtensionAlias("dv", "qt"); - + #if !defined(USE_QTKIT) addFileExtensionAlias("mov", "qt"); addFileExtensionAlias("avi", "qt"); @@ -1062,7 +1062,7 @@ std::string Registry::findDataFileImplementation(const std::string& filename, co return std::string(); } -std::string Registry::findLibraryFileImplementation(const std::string& filename, const Options* options, CaseSensitivity caseSensitivity) +std::string Registry::findLibraryFileImplementation(const std::string& filename, const Options* /*options*/, CaseSensitivity caseSensitivity) { if (filename.empty()) return filename; @@ -1186,7 +1186,7 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor) osgDB::getServerProtocol(readFunctor._filename), osgDB::getFileExtension(readFunctor._filename) ); - + if (rw) { return readFunctor.doRead(*rw); @@ -1205,7 +1205,7 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor) // sort the results so the most relevant (i.e. ERROR_IN_READING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list. std::sort(results.begin(), results.end()); ReaderWriter::ReadResult result = results.back(); - + if (result.message().empty()) { switch(result.status()) @@ -1327,7 +1327,7 @@ ReaderWriter::WriteResult Registry::writeObjectImplementation(const Object& obj, // sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list. std::sort(results.begin(), results.end()); ReaderWriter::WriteResult result = results.back(); - + if (result.message().empty()) { switch(result.status()) @@ -1383,7 +1383,7 @@ ReaderWriter::WriteResult Registry::writeImageImplementation(const Image& image, // sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list. std::sort(results.begin(), results.end()); ReaderWriter::WriteResult result = results.back(); - + if (result.message().empty()) { switch(result.status()) @@ -1434,11 +1434,11 @@ ReaderWriter::WriteResult Registry::writeHeightFieldImplementation(const HeightF { return ReaderWriter::WriteResult("Warning: Could not find plugin to write HeightField to file \""+fileName+"\"."); } - + // sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list. std::sort(results.begin(), results.end()); ReaderWriter::WriteResult result = results.back(); - + if (result.message().empty()) { switch(result.status()) @@ -1507,7 +1507,7 @@ ReaderWriter::WriteResult Registry::writeNodeImplementation(const Node& node,con // sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list. std::sort(results.begin(), results.end()); ReaderWriter::WriteResult result = results.back(); - + if (result.message().empty()) { switch(result.status()) @@ -1563,7 +1563,7 @@ ReaderWriter::WriteResult Registry::writeShaderImplementation(const Shader& shad // sort the results so the most relevant (i.e. ERROR_IN_WRITING_FILE is more relevant than FILE_NOT_FOUND) results get placed at the end of the results list. std::sort(results.begin(), results.end()); ReaderWriter::WriteResult result = results.back(); - + if (result.message().empty()) { switch(result.status()) @@ -1741,11 +1741,11 @@ ReaderWriter* Registry::getReaderWriterForProtocolAndExtension(const std::string ReaderWriter* result = getReaderWriterForExtension(extension); if (result && result->acceptsProtocol(protocol)) return result; - + result = NULL; ReaderWriterList results; getReaderWriterListForProtocol(protocol, results); - + for(ReaderWriterList::const_iterator i = results.begin(); i != results.end(); ++i) { // if we have a readerwriter which supports wildcards, save it as a fallback @@ -1754,6 +1754,6 @@ ReaderWriter* Registry::getReaderWriterForProtocolAndExtension(const std::string else if ((*i)->acceptsExtension(extension)) return i->get(); } - + return result ? result : getReaderWriterForExtension("curl"); } diff --git a/src/osgDB/XmlParser.cpp b/src/osgDB/XmlParser.cpp index 35866be91..98cf72dfa 100644 --- a/src/osgDB/XmlParser.cpp +++ b/src/osgDB/XmlParser.cpp @@ -491,7 +491,7 @@ bool XmlNode::writeString(const ControlMap& controlMap, std::ostream& fout, cons return true; } -bool XmlNode::writeChildren(const ControlMap& controlMap, std::ostream& fout, const std::string& indent) const +bool XmlNode::writeChildren(const ControlMap& /*controlMap*/, std::ostream& fout, const std::string& indent) const { for(Children::const_iterator citr = children.begin(); citr != children.end(); diff --git a/src/osgGA/CameraManipulator.cpp b/src/osgGA/CameraManipulator.cpp index ce16e1631..9646f2149 100644 --- a/src/osgGA/CameraManipulator.cpp +++ b/src/osgGA/CameraManipulator.cpp @@ -21,7 +21,8 @@ CameraManipulator::CameraManipulator() CameraManipulator::CameraManipulator(const CameraManipulator& mm, const CopyOp& copyOp) - : inherited(mm, copyOp), + : osg::Object(mm, copyOp), + inherited(mm, copyOp), _intersectTraversalMask(mm._intersectTraversalMask), _autoComputeHomePosition(mm._autoComputeHomePosition), _homeEye(mm._homeEye), diff --git a/src/osgGA/Device.cpp b/src/osgGA/Device.cpp index a5d764663..b4abc0bd9 100644 --- a/src/osgGA/Device.cpp +++ b/src/osgGA/Device.cpp @@ -28,7 +28,7 @@ Device::Device(const Device& es, const osg::CopyOp& copyop): setEventQueue(new EventQueue); } -void Device::sendEvent(const GUIEventAdapter& event) +void Device::sendEvent(const GUIEventAdapter& /*event*/) { OSG_WARN << "Device::sendEvent not implemented!" << std::endl; } diff --git a/src/osgGA/FirstPersonManipulator.cpp b/src/osgGA/FirstPersonManipulator.cpp index a27946edb..39801b597 100644 --- a/src/osgGA/FirstPersonManipulator.cpp +++ b/src/osgGA/FirstPersonManipulator.cpp @@ -44,7 +44,8 @@ FirstPersonManipulator::FirstPersonManipulator( int flags ) /// Constructor. FirstPersonManipulator::FirstPersonManipulator( const FirstPersonManipulator& fpm, const CopyOp& copyOp ) - : inherited( fpm, copyOp ), + : osg::Object(fpm, copyOp), + inherited( fpm, copyOp ), _eye( fpm._eye ), _rotation( fpm._rotation ), _velocity( fpm._velocity ), @@ -294,7 +295,7 @@ bool FirstPersonManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIAct // doc in parent -bool FirstPersonManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool FirstPersonManipulator::performMovementLeftMouseButton( const double /*eventTimeDelta*/, const double dx, const double dy ) { // world up vector CoordinateFrame coordinateFrame = getCoordinateFrame( _eye ); @@ -353,7 +354,7 @@ void FirstPersonManipulator::moveUp( const double distance ) } -void FirstPersonManipulator::applyAnimationStep( const double currentProgress, const double prevProgress ) +void FirstPersonManipulator::applyAnimationStep( const double currentProgress, const double /*prevProgress*/ ) { FirstPersonAnimationData *ad = dynamic_cast< FirstPersonAnimationData* >( _animationData.get() ); assert( ad ); diff --git a/src/osgGA/FlightManipulator.cpp b/src/osgGA/FlightManipulator.cpp index 7509a24c9..2c31a045a 100644 --- a/src/osgGA/FlightManipulator.cpp +++ b/src/osgGA/FlightManipulator.cpp @@ -28,7 +28,8 @@ FlightManipulator::FlightManipulator( int flags ) /// Constructor. FlightManipulator::FlightManipulator( const FlightManipulator& fm, const CopyOp& copyOp ) - : inherited( fm, copyOp ), + : osg::Object(fm, copyOp), + inherited( fm, copyOp ), _yawMode( fm._yawMode ) { } @@ -221,7 +222,7 @@ bool FlightManipulator::performMovement() } -bool FlightManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool FlightManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double /*dx*/, const double /*dy*/ ) { // pan model _velocity += eventTimeDelta * (_acceleration + _velocity); @@ -229,14 +230,14 @@ bool FlightManipulator::performMovementLeftMouseButton( const double eventTimeDe } -bool FlightManipulator::performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool FlightManipulator::performMovementMiddleMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ ) { _velocity = 0.0f; return true; } -bool FlightManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool FlightManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double /*dx*/, const double /*dy*/ ) { _velocity -= eventTimeDelta * (_acceleration + _velocity); return true; diff --git a/src/osgGA/MultiTouchTrackballManipulator.cpp b/src/osgGA/MultiTouchTrackballManipulator.cpp index 37070bfb9..2ac46d4c4 100644 --- a/src/osgGA/MultiTouchTrackballManipulator.cpp +++ b/src/osgGA/MultiTouchTrackballManipulator.cpp @@ -30,7 +30,7 @@ MultiTouchTrackballManipulator::MultiTouchTrackballManipulator( int flags ) /// Constructor. MultiTouchTrackballManipulator::MultiTouchTrackballManipulator( const MultiTouchTrackballManipulator& tm, const CopyOp& copyOp ) - : inherited( tm, copyOp ) + : osg::Object(tm, copyOp), inherited( tm, copyOp ) { } diff --git a/src/osgGA/NodeTrackerManipulator.cpp b/src/osgGA/NodeTrackerManipulator.cpp index 64d8cac8f..0155813af 100644 --- a/src/osgGA/NodeTrackerManipulator.cpp +++ b/src/osgGA/NodeTrackerManipulator.cpp @@ -30,7 +30,8 @@ NodeTrackerManipulator::NodeTrackerManipulator( int flags ) NodeTrackerManipulator::NodeTrackerManipulator( const NodeTrackerManipulator& m, const CopyOp& copyOp ) - : inherited( m, copyOp ), + : osg::Object(m, copyOp), + inherited( m, copyOp ), _trackNodePath( m._trackNodePath ), _trackerMode( m._trackerMode ) { @@ -281,7 +282,7 @@ bool NodeTrackerManipulator::performMovementLeftMouseButton( const double eventT // doc in parent -bool NodeTrackerManipulator::performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool NodeTrackerManipulator::performMovementMiddleMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ ) { osg::Vec3d nodeCenter; osg::Quat nodeRotation; diff --git a/src/osgGA/OrbitManipulator.cpp b/src/osgGA/OrbitManipulator.cpp index 9fdb1bbe6..1ee5af221 100644 --- a/src/osgGA/OrbitManipulator.cpp +++ b/src/osgGA/OrbitManipulator.cpp @@ -43,7 +43,8 @@ OrbitManipulator::OrbitManipulator( int flags ) /// Constructor. OrbitManipulator::OrbitManipulator( const OrbitManipulator& om, const CopyOp& copyOp ) - : inherited( om, copyOp ), + : osg::Object(om, copyOp), + inherited( om, copyOp ), _center( om._center ), _rotation( om._rotation ), _distance( om._distance ), @@ -297,7 +298,7 @@ bool OrbitManipulator::performMovementMiddleMouseButton( const double eventTimeD // doc in parent -bool OrbitManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool OrbitManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double /*dx*/, const double dy ) { // zoom model zoomModel( dy * getThrowScale( eventTimeDelta ), true ); @@ -378,7 +379,7 @@ void OrbitManipulator::OrbitAnimationData::start( const osg::Vec3d& movement, co Scale parameter is useful, for example, when manipulator is thrown. It scales the amount of rotation based, for example, on the current frame time.*/ void OrbitManipulator::rotateTrackball( const float px0, const float py0, - const float px1, const float py1, const float scale ) + const float px1, const float py1, const float /*scale*/ ) { osg::Vec3d axis; float angle; diff --git a/src/osgGA/StandardManipulator.cpp b/src/osgGA/StandardManipulator.cpp index 87cc30124..105fb8a04 100644 --- a/src/osgGA/StandardManipulator.cpp +++ b/src/osgGA/StandardManipulator.cpp @@ -48,7 +48,8 @@ StandardManipulator::StandardManipulator( int flags ) /// Constructor. StandardManipulator::StandardManipulator( const StandardManipulator& uim, const CopyOp& copyOp ) - : inherited( uim, copyOp ), + : osg::Object(uim, copyOp), + inherited( uim, copyOp ), _thrown( uim._thrown ), _allowThrow( uim._allowThrow ), _mouseCenterX(0.0f), _mouseCenterY(0.0f), @@ -189,7 +190,7 @@ void StandardManipulator::home( double /*currentTime*/ ) StandardManipulator implementation only updates its internal data. If home position is expected to be supported by the descendant manipulator, it has to reimplement the method to update manipulator transformation.*/ -void StandardManipulator::home( const GUIEventAdapter& ea, GUIActionAdapter& us ) +void StandardManipulator::home( const GUIEventAdapter& /*ea*/, GUIActionAdapter& us ) { if( getAutoComputeHomePosition() ) { @@ -207,7 +208,7 @@ void StandardManipulator::home( const GUIEventAdapter& ea, GUIActionAdapter& us /** Start/restart the manipulator.*/ -void StandardManipulator::init( const GUIEventAdapter& ea, GUIActionAdapter& us ) +void StandardManipulator::init( const GUIEventAdapter& /*ea*/, GUIActionAdapter& us ) { flushMouseEventStack(); @@ -300,7 +301,7 @@ bool StandardManipulator::handleResize( const GUIEventAdapter& ea, GUIActionAdap /// Handles GUIEventAdapter::MOVE event. -bool StandardManipulator::handleMouseMove( const GUIEventAdapter& ea, GUIActionAdapter& us ) +bool StandardManipulator::handleMouseMove( const GUIEventAdapter& /*ea*/, GUIActionAdapter& /*us*/ ) { return false; } @@ -388,14 +389,14 @@ bool StandardManipulator::handleKeyDown( const GUIEventAdapter& ea, GUIActionAda /// Handles GUIEventAdapter::KEYUP event. -bool StandardManipulator::handleKeyUp( const GUIEventAdapter& ea, GUIActionAdapter& us ) +bool StandardManipulator::handleKeyUp( const GUIEventAdapter& /*ea*/, GUIActionAdapter& /*us*/ ) { return false; } /// Handles GUIEventAdapter::SCROLL event. -bool StandardManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIActionAdapter& us ) +bool StandardManipulator::handleMouseWheel( const GUIEventAdapter& /*ea*/, GUIActionAdapter& /*us*/ ) { return false; } @@ -454,7 +455,7 @@ bool StandardManipulator::performMovement() /** Make movement step of manipulator. This method implements movement for left mouse button.*/ -bool StandardManipulator::performMovementLeftMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool StandardManipulator::performMovementLeftMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ ) { return false; } @@ -463,7 +464,7 @@ bool StandardManipulator::performMovementLeftMouseButton( const double eventTime /** Make movement step of manipulator. This method implements movement for middle mouse button or combination of left and right mouse button pressed together.*/ -bool StandardManipulator::performMovementMiddleMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool StandardManipulator::performMovementMiddleMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ ) { return false; } @@ -471,7 +472,7 @@ bool StandardManipulator::performMovementMiddleMouseButton( const double eventTi /** Make movement step of manipulator. This method implements movement for right mouse button.*/ -bool StandardManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool StandardManipulator::performMovementRightMouseButton( const double /*eventTimeDelta*/, const double /*dx*/, const double /*dy*/ ) { return false; } @@ -494,7 +495,7 @@ bool StandardManipulator::handleMouseDeltaMovement( const GUIEventAdapter& ea, G /// The method performs manipulator update based on relative mouse movement (mouse delta). -bool StandardManipulator::performMouseDeltaMovement( const float dx, const float dy ) +bool StandardManipulator::performMouseDeltaMovement( const float /*dx*/, const float /*dy*/ ) { return false; } @@ -522,7 +523,7 @@ bool StandardManipulator::performAnimationMovement( const GUIEventAdapter& ea, G /// Updates manipulator by a single animation step -void StandardManipulator::applyAnimationStep( const double currentProgress, const double prevProgress ) +void StandardManipulator::applyAnimationStep( const double /*currentProgress*/, const double /*prevProgress*/ ) { } @@ -719,7 +720,7 @@ void StandardManipulator::fixVerticalAxis( Quat& rotation, const Vec3d& localUp, * right and up camera vectors are negated (changing roll by 180 degrees), * making pitch once again between -90..+90 degrees limits.*/ void StandardManipulator::fixVerticalAxis( const osg::Vec3d& forward, const osg::Vec3d& up, osg::Vec3d& newUp, - const osg::Vec3d& localUp, bool disallowFlipOver ) + const osg::Vec3d& localUp, bool /*disallowFlipOver*/ ) { // right direction osg::Vec3d right1 = forward ^ localUp; @@ -826,7 +827,7 @@ bool StandardManipulator::setCenterByMousePointerIntersection( const GUIEventAda If there is a hit, animation is started and true is returned. Otherwise, the method returns false.*/ bool StandardManipulator::startAnimationByMousePointerIntersection( - const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us ) + const osgGA::GUIEventAdapter& /*ea*/, osgGA::GUIActionAdapter& /*us*/ ) { return false; } diff --git a/src/osgGA/TerrainManipulator.cpp b/src/osgGA/TerrainManipulator.cpp index 3912423f4..928dc5118 100644 --- a/src/osgGA/TerrainManipulator.cpp +++ b/src/osgGA/TerrainManipulator.cpp @@ -29,7 +29,8 @@ TerrainManipulator::TerrainManipulator( int flags ) /// Constructor. TerrainManipulator::TerrainManipulator( const TerrainManipulator& tm, const CopyOp& copyOp ) - : inherited( tm, copyOp ), + : osg::Object(tm, copyOp), + inherited( tm, copyOp ), _previousUp( tm._previousUp ) { } @@ -299,7 +300,7 @@ bool TerrainManipulator::performMovementMiddleMouseButton( const double eventTim } -bool TerrainManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double dx, const double dy ) +bool TerrainManipulator::performMovementRightMouseButton( const double eventTimeDelta, const double /*dx*/, const double dy ) { // zoom model zoomModel( dy * getThrowScale( eventTimeDelta ), false ); diff --git a/src/osgGA/TrackballManipulator.cpp b/src/osgGA/TrackballManipulator.cpp index 2992633a1..8448a9cac 100644 --- a/src/osgGA/TrackballManipulator.cpp +++ b/src/osgGA/TrackballManipulator.cpp @@ -28,6 +28,7 @@ TrackballManipulator::TrackballManipulator( int flags ) /// Constructor. TrackballManipulator::TrackballManipulator( const TrackballManipulator& tm, const CopyOp& copyOp ) - : inherited( tm, copyOp ) + : osg::Object(tm, copyOp), + inherited( tm, copyOp ) { } diff --git a/src/osgParticle/SinkOperator.cpp b/src/osgParticle/SinkOperator.cpp index 582df1be3..c947e6aa3 100644 --- a/src/osgParticle/SinkOperator.cpp +++ b/src/osgParticle/SinkOperator.cpp @@ -27,13 +27,13 @@ void SinkOperator::beginOperate( Program* prg ) DomainOperator::beginOperate(prg ); } -void SinkOperator::handlePoint( const Domain& domain, Particle* P, double dt ) +void SinkOperator::handlePoint( const Domain& domain, Particle* P, double /*dt*/ ) { const osg::Vec3& value = getValue(P); kill( P, (domain.v1==value) ); } -void SinkOperator::handleLineSegment( const Domain& domain, Particle* P, double dt ) +void SinkOperator::handleLineSegment( const Domain& domain, Particle* P, double /*dt*/ ) { const osg::Vec3& value = getValue(P); osg::Vec3 offset = value - domain.v1, normal = domain.v2 - domain.v1; @@ -43,7 +43,7 @@ void SinkOperator::handleLineSegment( const Domain& domain, Particle* P, double kill( P, (diff=-domain.plane[3]); kill( P, insideDomain ); } -void SinkOperator::handleSphere( const Domain& domain, Particle* P, double dt ) +void SinkOperator::handleSphere( const Domain& domain, Particle* P, double /*dt*/ ) { const osg::Vec3& value = getValue(P); float r = (value - domain.v1).length(); kill( P, (r<=domain.r1) ); } -void SinkOperator::handleBox( const Domain& domain, Particle* P, double dt ) +void SinkOperator::handleBox( const Domain& domain, Particle* P, double /*dt*/ ) { const osg::Vec3& value = getValue(P); bool insideDomain = !( @@ -100,7 +100,7 @@ void SinkOperator::handleBox( const Domain& domain, Particle* P, double dt ) kill( P, insideDomain ); } -void SinkOperator::handleDisk( const Domain& domain, Particle* P, double dt ) +void SinkOperator::handleDisk( const Domain& domain, Particle* P, double /*dt*/ ) { bool insideDomain = false; const osg::Vec3& value = getValue(P); diff --git a/src/osgPlugins/osg/AsciiStreamOperator.h b/src/osgPlugins/osg/AsciiStreamOperator.h index f0207deeb..c0925e989 100644 --- a/src/osgPlugins/osg/AsciiStreamOperator.h +++ b/src/osgPlugins/osg/AsciiStreamOperator.h @@ -95,7 +95,7 @@ public: indentIfRequired(); *_out << mark._name; } - virtual void writeCharArray( const char* s, unsigned int size ) {} + virtual void writeCharArray( const char* /*s*/, unsigned int /*size*/ ) {} virtual void writeWrappedString( const std::string& str ) { @@ -240,13 +240,13 @@ public: prop.set( value ); } - virtual void readMark( osgDB::ObjectMark& mark ) + virtual void readMark( osgDB::ObjectMark& /*mark*/ ) { std::string markString; readString( markString ); } - virtual void readCharArray( char* s, unsigned int size ) {} + virtual void readCharArray( char* /*s*/, unsigned int /*size*/ ) {} virtual void readWrappedString( std::string& str ) { diff --git a/src/osgPlugins/osg/BinaryStreamOperator.h b/src/osgPlugins/osg/BinaryStreamOperator.h index 5f3c3ce1e..03ad5b6d4 100644 --- a/src/osgPlugins/osg/BinaryStreamOperator.h +++ b/src/osgPlugins/osg/BinaryStreamOperator.h @@ -68,9 +68,9 @@ public: _out->write( s.c_str(), s.size() ); } - virtual void writeStream( std::ostream& (*fn)(std::ostream&) ) {} + virtual void writeStream( std::ostream& (*/*fn*/)(std::ostream&) ) {} - virtual void writeBase( std::ios_base& (*fn)(std::ios_base&) ) {} + virtual void writeBase( std::ios_base& (*/*fn*/)(std::ios_base&) ) {} virtual void writeGLenum( const osgDB::ObjectGLenum& value ) { GLenum e = value.get(); _out->write((char*)&e, osgDB::GLENUM_SIZE); } @@ -208,9 +208,9 @@ public: } } - virtual void readStream( std::istream& (*fn)(std::istream&) ) {} + virtual void readStream( std::istream& (*/*fn*/)(std::istream&) ) {} - virtual void readBase( std::ios_base& (*fn)(std::ios_base&) ) {} + virtual void readBase( std::ios_base& (*/*fn*/)(std::ios_base&) ) {} virtual void readGLenum( osgDB::ObjectGLenum& value ) { diff --git a/src/osgPlugins/osg/XmlStreamOperator.h b/src/osgPlugins/osg/XmlStreamOperator.h index 097c37d34..93e8b2257 100644 --- a/src/osgPlugins/osg/XmlStreamOperator.h +++ b/src/osgPlugins/osg/XmlStreamOperator.h @@ -150,7 +150,7 @@ public: } } - virtual void writeCharArray( const char* s, unsigned int size ) {} + virtual void writeCharArray( const char* /*s*/, unsigned int /*size*/ ) {} virtual void writeWrappedString( const std::string& str ) { @@ -429,9 +429,9 @@ public: prop.set( value ); } - virtual void readMark( osgDB::ObjectMark& mark ) {} + virtual void readMark( osgDB::ObjectMark& /*mark*/ ) {} - virtual void readCharArray( char* s, unsigned int size ) {} + virtual void readCharArray( char* /*s*/, unsigned int /*size*/ ) {} virtual void readWrappedString( std::string& str ) { diff --git a/src/osgPresentation/KeyEventHandler.cpp b/src/osgPresentation/KeyEventHandler.cpp index 79685a8e3..bbeed5ba5 100644 --- a/src/osgPresentation/KeyEventHandler.cpp +++ b/src/osgPresentation/KeyEventHandler.cpp @@ -44,7 +44,7 @@ KeyEventHandler::KeyEventHandler(int key, const osgPresentation::KeyPosition& ke { } -bool KeyEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv) +bool KeyEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& /*aa*/, osg::Object*, osg::NodeVisitor* /*nv*/) { if (ea.getHandled()) return false; diff --git a/src/osgPresentation/PropertyManager.cpp b/src/osgPresentation/PropertyManager.cpp index 965973472..4e99d6d71 100644 --- a/src/osgPresentation/PropertyManager.cpp +++ b/src/osgPresentation/PropertyManager.cpp @@ -140,19 +140,19 @@ public: } template - void combineRotationUserValue(T& value) const + void combineRotationUserValue(T& /*value*/) const { OSG_NOTICE<<"combineRotationUserValue TODO - do slerp"< - void combinePlaneUserValue(T& value) const + void combinePlaneUserValue(T& /*value*/) const { OSG_NOTICE<<"combinePlaneUserValue TODO"< - void combineMatrixUserValue(T& value) const + void combineMatrixUserValue(T& /*value*/) const { OSG_NOTICE<<"combineMatrixUserValue TODO - decomposs into translate, rotation and scale and then interpolate."< destination = node.getOrCreateUserDataContainer(); - + assign(destination.get(), p1); - + for(unsigned int i2=0; i2getNumUserObjects(); ++i2) { osg::Object* obj_2 = p2->getUserObject(i2); @@ -256,7 +256,7 @@ void PropertyAnimation::update(osg::Node& node) // need to insert property; assign(destination.get(), obj_2); } - + } } @@ -265,7 +265,7 @@ void PropertyAnimation::update(osg::Node& node) OSG_NOTICE<<"PropertyAnimation::update() : copy last UserDataContainer"<second.get()); } - + } void PropertyAnimation::assign(osg::UserDataContainer* destination, osg::UserDataContainer* source) @@ -282,14 +282,14 @@ void PropertyAnimation::assign(osg::UserDataContainer* destination, osg::UserDat void PropertyAnimation::assign(osg::UserDataContainer* udc, osg::Object* obj) { if (!obj) return; - + unsigned int index = udc->getUserObjectIndex(obj); if (index != udc->getNumUserObjects()) { OSG_NOTICE<<"Object already assigned to UserDataContainer"<getUserObjectIndex(obj->getName()); if (index != udc->getNumUserObjects()) { @@ -312,14 +312,14 @@ void ImageSequenceUpdateCallback::operator()(osg::Node* node, osg::NodeVisitor* double xMin = -1.0; double xMax = 1.0; double position = ((double)x-xMin)/(xMax-xMin)*_imageSequence->getLength(); - + _imageSequence->seek(position); } else { OSG_INFO<<"ImageSequenceUpdateCallback::operator() Could not find property : "<<_propertyName<setProperty("mouse.x",ea.getX()); _propertyManager->setProperty("mouse.x_normalized",ea.getXnormalized()); _propertyManager->setProperty("mouse.y",ea.getX()); _propertyManager->setProperty("mouse.y_normalized",ea.getYnormalized()); } - + return false; } diff --git a/src/osgPresentation/SlideEventHandler.cpp b/src/osgPresentation/SlideEventHandler.cpp index 630ed2684..fe52c723c 100644 --- a/src/osgPresentation/SlideEventHandler.cpp +++ b/src/osgPresentation/SlideEventHandler.cpp @@ -43,7 +43,7 @@ bool JumpData::jump(SlideEventHandler* seh) const int slideNumToUse = slideNum; int layerNumToUse = layerNum; - + if (!slideName.empty()) { osg::Switch* presentation = seh->getPresentationSwitch(); @@ -63,7 +63,7 @@ bool JumpData::jump(SlideEventHandler* seh) const { slideNumToUse = seh->getActiveSlide() + slideNum; } - + if (!layerName.empty()) { @@ -98,10 +98,10 @@ bool JumpData::jump(SlideEventHandler* seh) const { layerNumToUse = seh->getActiveLayer() + layerNum; } - + if (slideNumToUse<0) slideNumToUse = 0; if (layerNumToUse<0) layerNumToUse = 0; - + OSG_INFO<<" jump to "<selectSlide(slideNumToUse,layerNumToUse); } @@ -142,15 +142,15 @@ struct InteractiveImageSequenceOperator : public ObjectOperator // need to pause till the load has been completed. } - virtual void maintain(SlideEventHandler* seh) + virtual void maintain(SlideEventHandler* /*seh*/) { } - virtual void leave(SlideEventHandler* seh) + virtual void leave(SlideEventHandler* /*seh*/) { } - virtual void setPause(SlideEventHandler* seh, bool pause) + virtual void setPause(SlideEventHandler* /*seh*/, bool /*pause*/) { } @@ -159,7 +159,7 @@ struct InteractiveImageSequenceOperator : public ObjectOperator set(seh); } - void set(SlideEventHandler* seh) + void set(SlideEventHandler* /*seh*/) { //OSG_NOTICE<<"InteractiveImageSequenceOperator::set(..)"<getReferenceTime(); _stopped = false; - + if (_delayTime==0.0) { start(seh); @@ -258,7 +258,7 @@ struct ImageStreamOperator : public ObjectOperator _started = true; _stopped = false; - + if (_startTime!=0.0) _imageStream->seek(_startTime); else _imageStream->rewind(); @@ -271,13 +271,13 @@ struct ImageStreamOperator : public ObjectOperator OpenThreads::Thread::microSleep(static_cast(microSecondsToDelay)); } - void stop(SlideEventHandler* seh) + void stop(SlideEventHandler* /*seh*/) { if (!_started) return; _started = false; _stopped = true; - + _imageStream->pause(); } @@ -341,7 +341,7 @@ struct CallbackOperator : public ObjectOperator { OSG_NOTICE<<"Need to pause callback : "<className()<callLeaveCallbacks(_node.get()); } - virtual void setPause(SlideEventHandler*, bool pause) + virtual void setPause(SlideEventHandler*, bool /*pause*/) { } @@ -1001,7 +1001,7 @@ bool SlideEventHandler::handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIAction if (ea.getHandled()) return false; _referenceTime = ea.getTime(); - + switch(ea.getEventType()) { case(osgGA::GUIEventAdapter::FRAME): @@ -1245,7 +1245,7 @@ unsigned int SlideEventHandler::getNumSlides() osg::Switch* SlideEventHandler::getSlide(int slideNum) { if (slideNum<0 || slideNum>static_cast(_presentationSwitch->getNumChildren())) return 0; - + FindNamedSwitchVisitor findSlide("Slide"); _presentationSwitch->getChild(slideNum)->accept(findSlide); return findSlide._switch; @@ -1335,7 +1335,7 @@ bool SlideEventHandler::selectSlide(int slideNum,int layerNum) _viewer->computeActiveCoordinateSystemNodePath(); } - + // resetUpdateCallbacks(ALL_OBJECTS); bool _useSlideFilePaths = false; @@ -1493,7 +1493,7 @@ bool SlideEventHandler::home(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAd } _viewer->getCameraManipulator()->home(ea,aa); } - + return true; } diff --git a/src/osgPresentation/SlideShowConstructor.cpp b/src/osgPresentation/SlideShowConstructor.cpp index b1835d9d5..807727372 100644 --- a/src/osgPresentation/SlideShowConstructor.cpp +++ b/src/osgPresentation/SlideShowConstructor.cpp @@ -816,7 +816,7 @@ public: texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR); #if USE_CLIENT_STORAGE_HINT texture->setClientStorageHint(true); -#endif +#endif } } } @@ -845,13 +845,13 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& heightVec = heightVec*rotationMatrix; osg::ImageStream* imageStream = dynamic_cast(image); - + // let the video-plugin create a texture for us, if supported if(imageStream && getenv("P3D_ENABLE_CORE_VIDEO")) { texture = imageStream->createSuitableTexture(); } - + bool flipYAxis = image->getOrigin()==osg::Image::TOP_LEFT; #if 1 @@ -863,7 +863,7 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& bool useTextureRectangle = true; #endif #endif - + // pass back info on wether texture 2D is used. usedTextureRectangle = useTextureRectangle; @@ -880,10 +880,10 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& texture->setResizeNonPowerOfTwoHint(false); texture->setFilter(osg::Texture::MIN_FILTER,osg::Texture::LINEAR); texture->setFilter(osg::Texture::MAG_FILTER,osg::Texture::LINEAR); - #if USE_CLIENT_STORAGE_HINT + #if USE_CLIENT_STORAGE_HINT texture->setClientStorageHint(true); #endif - + } } if (texture) @@ -891,23 +891,23 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& float t(0), l(0); float r = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? image->s() : 1; float b = (texture->getTextureTarget() == GL_TEXTURE_RECTANGLE) ? image->t() : 1; - + if (flipYAxis) std::swap(t,b); - + pictureQuad = osg::createTexturedQuadGeometry(positionVec, widthVec, heightVec, l, t, r, b); - + stateset = pictureQuad->getOrCreateStateSet(); stateset->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON); } - + if (!pictureQuad) return 0; - + if (imageStream) { imageStream->pause(); @@ -916,7 +916,7 @@ osg::Geometry* SlideShowConstructor::createTexturedQuadGeometry(const osg::Vec3& #if USE_CLIENT_STORAGE_HINT // make sure that OSX uses the client storage extension to accelerate peformance where possible. texture->setClientStorageHint(true); -#endif +#endif } @@ -1003,7 +1003,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I } filenames.push_back(foundFile); } - + if (filenames.empty()) return 0; if (filenames.size()==1) @@ -1044,7 +1044,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I { osg::ref_ptr loadedImage = osgDB::readImageFile(*itr, options.get()); if (loadedImage.valid()) - { + { imageSequence->addImage(loadedImage.get()); firstLoad = false; } @@ -1065,7 +1065,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I OSG_NOTICE<<"No Object _options assigned"< options = _options.valid() ? _options->cloneOptions() : (new osgDB::Options); if (!imageData.options.empty()) { @@ -1094,7 +1094,7 @@ osg::Image* SlideShowConstructor::readImage(const std::string& filename, const I { imageSequence->setName("USE_MOUSE_Y_POSITION"); } - + imageSequence->play(); @@ -1205,7 +1205,7 @@ void SlideShowConstructor::addImage(const std::string& filename, const PositionD isImageTranslucent = false; } - + float s = image->s(); float t = image->t(); @@ -1265,13 +1265,13 @@ void SlideShowConstructor::addImage(const std::string& filename, const PositionD } - if (imageStream && !imageData.volume.empty()) + if (imageStream && !imageData.volume.empty()) { setUpMovieVolume(subgraph, imageStream, imageData); } osg::ImageSequence* imageSequence = dynamic_cast(image.get()); - if (imageSequence) + if (imageSequence) { if (imageData.imageSequenceInteractionMode==ImageData::USE_MOUSE_X_POSITION) { @@ -1282,7 +1282,7 @@ void SlideShowConstructor::addImage(const std::string& filename, const PositionD subgraph->setUpdateCallback(new osgPresentation::ImageSequenceUpdateCallback(imageSequence, _propertyManager.get(), "mouse.y_normalized")); } } - + // attached any rotation if (positionData.rotation[0]!=0.0) { @@ -1339,7 +1339,7 @@ void SlideShowConstructor::addStereoImagePair(const std::string& filenameLeft, c { osg::ref_ptr imageLeft = readImage(filenameLeft, imageDataLeft); osg::ref_ptr imageRight = (filenameRight==filenameLeft) ? imageLeft.get() : readImage(filenameRight, imageDataRight); - + if (!imageLeft && !imageRight) return; bool isImageTranslucent = false; @@ -1935,14 +1935,14 @@ void SlideShowConstructor::addModel(const std::string& filename, const PositionD osg::ref_ptr clipnode = new osg::ClipNode; clipnode->createClipBox(osg::BoundingBox(0.0,0.0,0.0,1.0,1.0,1.0),0); clipnode->setCullingActive(false); - + osg::ref_ptr transform = new osg::MatrixTransform; transform->addChild(clipnode.get()); osg::ref_ptr group = new osg::Group; group->addChild(subgraph.get()); group->addChild(transform.get()); - + //clipnode->setStateSetModes(*(group->getOrCreateStateSet()), osg::StateAttribute::ON); group->setStateSet(clipnode->getStateSet()); @@ -1975,10 +1975,10 @@ void SlideShowConstructor::addModel(const std::string& filename, const PositionD subgraph = group; osgDB::writeNodeFile(*subgraph, "output.osgt"); - + } - + if (subgraph.valid()) { addModel(subgraph.get(), positionData, modelData); @@ -2237,9 +2237,9 @@ class VolumeTileCallback : public osg::NodeCallback META_Object(osgPresentation, VolumeTileCallback); void reset() {} - void update(osg::Node* node) {} - void setPause(bool pause) {} - + void update(osg::Node* /*node*/) {} + void setPause(bool /*pause*/) {} + virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osgVolume::VolumeTile* tile = dynamic_cast(node); @@ -2248,13 +2248,13 @@ class VolumeTileCallback : public osg::NodeCallback { OSG_NOTICE<<"VolumeTileCallback : Have locator matrix "<getTransform()<swap(*converted_image); } } - + if (positionData.scale.x()<0.0) { image->flipHorizontal(); @@ -2537,7 +2537,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position layer->setLocator(new osgVolume::Locator()); tile->setLocator(new osgVolume::Locator()); } - + if (!volumeData.region.empty()) { if (containsPropertyReference(volumeData.region)) @@ -2563,14 +2563,14 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position } } } - + tile->setLayer(layer.get()); osgVolume::SwitchProperty* sp = new osgVolume::SwitchProperty; sp->setActiveProperty(0); - + osgVolume::AlphaFuncProperty* ap = new osgVolume::AlphaFuncProperty(0.1f); setUpVolumeScalarProperty(tile.get(), ap, volumeData.cutoffValue); @@ -2586,7 +2586,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position sdm = new osgVolume::SampleDensityWhenMovingProperty(0.005); setUpVolumeScalarProperty(tile.get(), sdm, volumeData.sampleDensityWhenMovingValue); } - + osgVolume::TransferFunctionProperty* tfp = volumeData.transferFunction.valid() ? new osgVolume::TransferFunctionProperty(volumeData.transferFunction.get()) : 0; { @@ -2620,7 +2620,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position cp->addProperty(sd); cp->addProperty(tp); - + osgVolume::IsoSurfaceProperty* isp = new osgVolume::IsoSurfaceProperty(0.1); setUpVolumeScalarProperty(tile.get(), isp, volumeData.alphaValue); cp->addProperty(isp); @@ -2659,7 +2659,7 @@ void SlideShowConstructor::addVolume(const std::string& filename, const Position - + osg::ref_ptr model = volume.get(); if (volumeData.useTabbedDragger || volumeData.useTrackballDragger) diff --git a/src/osgQt/GraphicsWindowQt.cpp b/src/osgQt/GraphicsWindowQt.cpp index ba0d8f199..3147a98fc 100644 --- a/src/osgQt/GraphicsWindowQt.cpp +++ b/src/osgQt/GraphicsWindowQt.cpp @@ -441,7 +441,7 @@ bool GraphicsWindowQt::init( QWidget* parent, const QGLWidget* shareWidget, Qt:: // make sure the event queue has the correct window rectangle size and input range getEventQueue()->syncWindowRectangleWithGraphcisContext(); - + return true; } @@ -659,7 +659,7 @@ bool GraphicsWindowQt::realizeImplementation() // make sure the event queue has the correct window rectangle size and input range getEventQueue()->syncWindowRectangleWithGraphcisContext(); - + // make this window's context not current // note: this must be done as we will probably make the context current from another thread // and it is not allowed to have one context current in two threads @@ -764,7 +764,7 @@ public: } // Return the number of screens present in the system - virtual unsigned int getNumScreens( const osg::GraphicsContext::ScreenIdentifier& si ) + virtual unsigned int getNumScreens( const osg::GraphicsContext::ScreenIdentifier& /*si*/ ) { OSG_WARN << "osgQt: getNumScreens() not implemented yet." << std::endl; return 0; @@ -772,20 +772,20 @@ public: // Return the resolution of specified screen // (0,0) is returned if screen is unknown - virtual void getScreenSettings( const osg::GraphicsContext::ScreenIdentifier& si, osg::GraphicsContext::ScreenSettings & resolution ) + virtual void getScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, osg::GraphicsContext::ScreenSettings & /*resolution*/ ) { OSG_WARN << "osgQt: getScreenSettings() not implemented yet." << std::endl; } // Set the resolution for given screen - virtual bool setScreenSettings( const osg::GraphicsContext::ScreenIdentifier& si, const osg::GraphicsContext::ScreenSettings & resolution ) + virtual bool setScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*si*/, const osg::GraphicsContext::ScreenSettings & /*resolution*/ ) { OSG_WARN << "osgQt: setScreenSettings() not implemented yet." << std::endl; return false; } // Enumerates available resolutions - virtual void enumerateScreenSettings( const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, osg::GraphicsContext::ScreenSettingsList & resolution ) + virtual void enumerateScreenSettings( const osg::GraphicsContext::ScreenIdentifier& /*screenIdentifier*/, osg::GraphicsContext::ScreenSettingsList & /*resolution*/ ) { OSG_WARN << "osgQt: enumerateScreenSettings() not implemented yet." << std::endl; } @@ -875,7 +875,7 @@ void HeartBeat::init( osgViewer::ViewerBase *viewer ) } -void HeartBeat::timerEvent( QTimerEvent *event ) +void HeartBeat::timerEvent( QTimerEvent */*event*/ ) { osg::ref_ptr< osgViewer::ViewerBase > viewer; if( !_viewer.lock( viewer ) ) diff --git a/src/osgQt/QFontImplementation.cpp b/src/osgQt/QFontImplementation.cpp index 4cf8304b9..8b5e28d09 100644 --- a/src/osgQt/QFontImplementation.cpp +++ b/src/osgQt/QFontImplementation.cpp @@ -122,7 +122,7 @@ QFontImplementation::getGlyph(const osgText::FontResolution& fontRes, unsigned i } osg::Vec2 -QFontImplementation::getKerning(unsigned int leftcharcode, unsigned int rightcharcode, osgText::KerningType kerningType) +QFontImplementation::getKerning(unsigned int /*leftcharcode*/, unsigned int /*rightcharcode*/, osgText::KerningType /*kerningType*/) { return osg::Vec2(0, 0); } diff --git a/src/osgQt/QWidgetImage.cpp b/src/osgQt/QWidgetImage.cpp index f6b5b9f39..bd9c24cba 100644 --- a/src/osgQt/QWidgetImage.cpp +++ b/src/osgQt/QWidgetImage.cpp @@ -43,7 +43,7 @@ void QWidgetImage::render() _adapter->render(); } -void QWidgetImage::scaleImage(int s,int t,int r, GLenum newDataType) +void QWidgetImage::scaleImage(int s,int t,int /*r*/, GLenum /*newDataType*/) { _adapter->resize(s, t); } diff --git a/src/osgShadow/ConvexPolyhedron.cpp b/src/osgShadow/ConvexPolyhedron.cpp index f00dbd6ba..3ce398bac 100644 --- a/src/osgShadow/ConvexPolyhedron.cpp +++ b/src/osgShadow/ConvexPolyhedron.cpp @@ -1162,7 +1162,9 @@ bool ConvexPolyhedron::checkCoherency dumpGeometry( ); #endif - +#else + OSG_UNUSED(checkForNonConvexPolys); + OSG_UNUSED(errorPrefix); #endif // CONVEX_POLYHEDRON_CHECK_COHERENCY return result && convex; } diff --git a/src/osgShadow/DebugShadowMap.cpp b/src/osgShadow/DebugShadowMap.cpp index 5bc2afad3..989636294 100644 --- a/src/osgShadow/DebugShadowMap.cpp +++ b/src/osgShadow/DebugShadowMap.cpp @@ -154,6 +154,9 @@ bool DebugShadowMap::ViewData::DebugBoundingBox << std::endl; bb_prev = bb; +#else + OSG_UNUSED(bb); + OSG_UNUSED(name); #endif return result; } @@ -192,6 +195,9 @@ bool DebugShadowMap::ViewData::DebugPolytope } p_prev = p; +#else + OSG_UNUSED(p); + OSG_UNUSED(name); #endif return result; } @@ -215,6 +221,9 @@ bool DebugShadowMap::ViewData::DebugMatrix <<"[ " << m(3,0) << " " << m(3,1) << " " << m(3,2) << " " << m(3,3) << " ] " << std::endl; m_prev = m; +#else + OSG_UNUSED(m); + OSG_UNUSED(name); #endif return result; } diff --git a/src/osgShadow/MinimalShadowMap.cpp b/src/osgShadow/MinimalShadowMap.cpp index 5d99116bf..52e349807 100644 --- a/src/osgShadow/MinimalShadowMap.cpp +++ b/src/osgShadow/MinimalShadowMap.cpp @@ -336,7 +336,7 @@ void MinimalShadowMap::ViewData::init( ThisClass *st, osgUtil::CullVisitor *cv ) } void MinimalShadowMap::ViewData::cutScenePolytope - ( const osg::Matrix & transform, + ( const osg::Matrix & /*transform*/, const osg::Matrix & inverse, const osg::BoundingBox & bb ) { diff --git a/src/osgShadow/ViewDependentShadowMap.cpp b/src/osgShadow/ViewDependentShadowMap.cpp index 1c725f32c..088115ebd 100644 --- a/src/osgShadow/ViewDependentShadowMap.cpp +++ b/src/osgShadow/ViewDependentShadowMap.cpp @@ -704,7 +704,7 @@ void ViewDependentShadowMap::cleanSceneGraph() OSG_INFO<<"ViewDependentShadowMap::cleanSceneGraph()"<maxZFar) minZNear = maxZFar*settings->getMinimumShadowMapNearFarRatio(); //OSG_NOTICE<<"maxZFar "<getShadowSettings(); @@ -2347,7 +2347,7 @@ osg::StateSet* ViewDependentShadowMap::selectStateSetForRenderingShadow(ViewDepe osg::ref_ptr stateset = vdd.getStateSet(); OpenThreads::ScopedLock lock(_accessUnfiromsAndProgramMutex); - + vdd.getStateSet()->clear(); vdd.getStateSet()->setTextureAttributeAndModes(0, _fallbackBaseTexture.get(), osg::StateAttribute::ON); @@ -2416,7 +2416,7 @@ osg::StateSet* ViewDependentShadowMap::selectStateSetForRenderingShadow(ViewDepe return vdd.getStateSet(); } -void ViewDependentShadowMap::resizeGLObjectBuffers(unsigned int maxSize) +void ViewDependentShadowMap::resizeGLObjectBuffers(unsigned int /*maxSize*/) { // the way that ViewDependentData is mapped shouldn't } diff --git a/src/osgTerrain/Layer.cpp b/src/osgTerrain/Layer.cpp index b387131d7..86e09d982 100644 --- a/src/osgTerrain/Layer.cpp +++ b/src/osgTerrain/Layer.cpp @@ -262,19 +262,19 @@ bool ImageLayer::getValue(unsigned int i, unsigned int j, float& value) const return true; } -bool ImageLayer::getValue(unsigned int i, unsigned int j, osg::Vec2& value) const +bool ImageLayer::getValue(unsigned int /*i*/, unsigned int /*j*/, osg::Vec2& /*value*/) const { OSG_NOTICE<<"Not implemented yet"<checkEvents()) return true; } - + return false; } @@ -468,7 +468,7 @@ void CompositeViewer::getScenes(Scenes& scenes, bool onlyValid) } } -void CompositeViewer::getViews(Views& views, bool onlyValid) +void CompositeViewer::getViews(Views& views, bool /*onlyValid*/) { views.clear(); @@ -733,11 +733,11 @@ void CompositeViewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEv // : project ray into RTT Camera's clip space, and RTT Camera's is Relative RF and sharing same scene graph as master then transform coords. // if camera isn't the master it must be a slave and could need reprojecting. - - + + osgViewer::View* view = dynamic_cast(camera->getView()); if (!view) return; - + osg::Camera* view_masterCamera = view->getCamera(); if (camera!=view_masterCamera) { @@ -751,7 +751,7 @@ void CompositeViewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEv double master_max_x = 1.0; double master_min_y = -1.0; double master_max_y = 1.0; - + osg::Matrix masterCameraVPW = view_masterCamera->getViewMatrix() * view_masterCamera->getProjectionMatrix(); if (view_masterCamera->getViewport()) { @@ -829,8 +829,8 @@ void CompositeViewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEv } } } - - + + void CompositeViewer::generatePointerData(osgGA::GUIEventAdapter& event) { osgViewer::GraphicsWindow* gw = dynamic_cast(event.getGraphicsContext()); @@ -841,7 +841,7 @@ void CompositeViewer::generatePointerData(osgGA::GUIEventAdapter& event) bool invert_y = event.getMouseYOrientation()==osgGA::GUIEventAdapter::Y_INCREASING_DOWNWARDS; if (invert_y && gw->getTraits()) y = gw->getTraits()->height - y; - + event.addPointerData(new osgGA::PointerData(gw, x, 0, gw->getTraits()->width, y, 0, gw->getTraits()->height)); @@ -893,7 +893,7 @@ void CompositeViewer::reprojectPointerData(osgGA::GUIEventAdapter& source_event, osg::Viewport* viewport = camera ? camera->getViewport() : 0; if (!viewport) return; - + dest_event.addPointerData(new osgGA::PointerData(camera, (x-viewport->x())/viewport->width()*2.0f-1.0f, -1.0, 1.0, (y-viewport->y())/viewport->height()*2.0f-1.0f, -1.0, 1.0)); @@ -935,9 +935,9 @@ void CompositeViewer::eventTraversal() // set done if there are no windows checkWindowStatus(contexts); if (_done) return; - + osgGA::EventQueue::Events all_events; - + for(Contexts::iterator citr = contexts.begin(); citr != contexts.end(); ++citr) @@ -963,7 +963,7 @@ void CompositeViewer::eventTraversal() // sort all the events in time order so we can make sure we pass them all on in the correct order. all_events.sort(SortEvents()); - + // pass on pointer data onto non mouse events to keep the position data usable by all recipients of all events. for(osgGA::EventQueue::Events::iterator itr = all_events.begin(); itr != all_events.end(); @@ -991,23 +991,23 @@ void CompositeViewer::eventTraversal() reprojectPointerData(*_previousEvent, *event); } -#if 0 +#if 0 // assign topmost PointeData settings as the events X,Y and InputRange osgGA::PointerData* pd = event->getPointerData(event->getNumPointerData()-1); event->setX(pd->x); event->setY(pd->y); event->setInputRange(pd->xMin, pd->yMin, pd->xMax, pd->yMax); event->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS); -#else +#else if (event->getMouseYOrientation()!=osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS) { event->setY((event->getYmax()-event->getY())+event->getYmin()); event->setMouseYOrientation(osgGA::GUIEventAdapter::Y_INCREASING_UPWARDS); } -#endif +#endif _previousEvent = event; - + break; } default: @@ -1018,28 +1018,28 @@ void CompositeViewer::eventTraversal() osgGA::PointerData* pd = event->getNumPointerData()>0 ? event->getPointerData(event->getNumPointerData()-1) : 0; osg::Camera* camera = pd ? dynamic_cast(pd->object.get()) : 0; osgViewer::View* view = camera ? dynamic_cast(camera->getView()) : 0; - - if (!view) + + if (!view) { - if (_viewWithFocus.valid()) + if (_viewWithFocus.valid()) { // OSG_NOTICE<<"Falling back to using _viewWithFocus"<getEventQueue()->getCurrentEventState(); eventState->copyPointerDataFrom(*event); } @@ -1073,7 +1073,7 @@ void CompositeViewer::eventTraversal() break; } } - + for(RefViews::iterator vitr = _views.begin(); vitr != _views.end(); @@ -1327,9 +1327,9 @@ void CompositeViewer::updateTraversal() { view->setFusionDistance( view->getCameraManipulator()->getFusionDistanceMode(), view->getCameraManipulator()->getFusionDistanceValue() ); - + view->getCameraManipulator()->updateCamera(*(view->getCamera())); - + } view->updateSlaves(); diff --git a/src/osgViewer/Keystone.cpp b/src/osgViewer/Keystone.cpp index cbdbc220e..cbb316a09 100644 --- a/src/osgViewer/Keystone.cpp +++ b/src/osgViewer/Keystone.cpp @@ -36,7 +36,8 @@ Keystone::Keystone(): top_left(-1.0,1.0), top_right(1.0,1.0) {} -Keystone::Keystone(const Keystone& rhs, const osg::CopyOp&): +Keystone::Keystone(const Keystone& rhs, const osg::CopyOp & copyop): + osg::Object(rhs, copyop), keystoneEditingEnabled(rhs.keystoneEditingEnabled), gridColour(rhs.gridColour), bottom_left(rhs.bottom_left), @@ -97,7 +98,7 @@ struct KeystoneCullCallback : public osg::Drawable::CullCallback META_Object(osg,KeystoneCullCallback); /** do customized cull code, return true if drawable should be culled.*/ - virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const + virtual bool cull(osg::NodeVisitor* /*nv*/, osg::Drawable* /*drawable*/, osg::RenderInfo* /*renderInfo*/) const { return _keystone.valid() ? !_keystone->getKeystoneEditingEnabled() : true; } @@ -413,7 +414,7 @@ osg::Vec2d KeystoneHandler::incrementScale(const osgGA::GUIEventAdapter& ea) con return _defaultIncrement; } -bool KeystoneHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, osg::Object* obj, osg::NodeVisitor* nv) +bool KeystoneHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/, osg::Object* obj, osg::NodeVisitor* /*nv*/) { osg::Camera* camera = dynamic_cast(obj); osg::Viewport* viewport = camera ? camera->getViewport() : 0; diff --git a/src/osgViewer/PixelBufferX11.cpp b/src/osgViewer/PixelBufferX11.cpp index ea6e5b36d..c835828db 100644 --- a/src/osgViewer/PixelBufferX11.cpp +++ b/src/osgViewer/PixelBufferX11.cpp @@ -439,7 +439,7 @@ bool PixelBufferX11::makeCurrentImplementation() #endif } -bool PixelBufferX11::makeContextCurrentImplementation(osg::GraphicsContext* readContext) +bool PixelBufferX11::makeContextCurrentImplementation(osg::GraphicsContext* /*readContext*/) { // OSG_NOTICE<<"PixelBufferX11::makeContextCurrentImplementation() not implementation yet."<glBeginQuery(GL_TIME_ELAPSED, query); _queryFrameNumberList.push_back(QueryFrameNumberPair(query, frameNumber)); } -void EXTQuerySupport::endQuery(osg::State* state) +void EXTQuerySupport::endQuery(osg::State* /*state*/) { _extensions->glEndQuery(GL_TIME_ELAPSED); } -void OpenGLQuerySupport::initialize(osg::State* state, osg::Timer_t startTick) +void OpenGLQuerySupport::initialize(osg::State* state, osg::Timer_t /*startTick*/) { _extensions = osg::Drawable::getExtensions(state->getContextID(),true); } @@ -177,7 +177,7 @@ void ARBQuerySupport::initialize(osg::State* state, osg::Timer_t startTick) OpenGLQuerySupport::initialize(state, startTick); } -void ARBQuerySupport::beginQuery(unsigned int frameNumber, osg::State* state) +void ARBQuerySupport::beginQuery(unsigned int frameNumber, osg::State* /*state*/) { QueryPair query; if (_availableQueryObjects.empty()) @@ -194,14 +194,14 @@ void ARBQuerySupport::beginQuery(unsigned int frameNumber, osg::State* state) _queryFrameList.push_back(ActiveQuery(query, frameNumber)); } -void ARBQuerySupport::endQuery(osg::State* state) +void ARBQuerySupport::endQuery(osg::State* /*state*/) { _extensions->glQueryCounter(_queryFrameList.back().queries.second, GL_TIMESTAMP); } void ARBQuerySupport::checkQuery(osg::Stats* stats, osg::State* state, - osg::Timer_t startTick) + osg::Timer_t /*startTick*/) { for(QueryFrameList::iterator itr = _queryFrameList.begin(); itr != _queryFrameList.end(); @@ -390,7 +390,7 @@ Renderer::Renderer(osg::Camera* camera): ((view && view->getDisplaySettings()) ? view->getDisplaySettings() : osg::DisplaySettings::instance().get()); _serializeDraw = ds ? ds->getSerializeDrawDispatch() : false; - + unsigned int sceneViewOptions = osgUtil::SceneView::HEADLIGHT; if (view) { @@ -423,7 +423,7 @@ Renderer::Renderer(osg::Camera* camera): _sceneView[0]->setResetColorMaskToAllOn(false); _sceneView[1]->setResetColorMaskToAllOn(false); } - + _sceneView[0]->setCamera(_camera.get(), false); _sceneView[1]->setCamera(_camera.get(), false); @@ -898,7 +898,7 @@ void Renderer::operator () (osg::Object* object) if (camera) cull(); } -void Renderer::operator () (osg::GraphicsContext* context) +void Renderer::operator () (osg::GraphicsContext* /*context*/) { if (_graphicsThreadDoesCull) { diff --git a/src/osgViewer/ScreenCaptureHandler.cpp b/src/osgViewer/ScreenCaptureHandler.cpp index b24253968..95db7e394 100644 --- a/src/osgViewer/ScreenCaptureHandler.cpp +++ b/src/osgViewer/ScreenCaptureHandler.cpp @@ -206,7 +206,7 @@ void WindowCaptureCallback::ContextData::updateTimings(osg::Timer_t tick_start, osg::Timer_t tick_afterReadPixels, osg::Timer_t tick_afterMemCpy, osg::Timer_t tick_afterCaptureOperation, - unsigned int dataSize) + unsigned int /*dataSize*/) { _timeForReadPixels = osg::Timer::instance()->delta_s(tick_start, tick_afterReadPixels); _timeForMemCpy = osg::Timer::instance()->delta_s(tick_afterReadPixels, tick_afterMemCpy); @@ -770,7 +770,7 @@ bool ScreenCaptureHandler::handle(const osgGA::GUIEventAdapter& ea, osgGA::GUIAc { _stopCapture = false; removeCallbackFromViewer(*viewer); - } + } break; } diff --git a/src/osgViewer/Viewer.cpp b/src/osgViewer/Viewer.cpp index e13f905f1..9ed6e1342 100644 --- a/src/osgViewer/Viewer.cpp +++ b/src/osgViewer/Viewer.cpp @@ -295,18 +295,18 @@ bool Viewer::readConfiguration(const std::string& filename) //OSG_NOTICE<<"Error: Unable to load configuration file \""<(object.get()); if (config) { OSG_NOTICE<<"Using osgViewer::Config : "<className()<configure(*this); - + osgDB::writeObjectFile(*config,"test.osgt"); - + return true; } - + CompositeViewer* compositeViewer = dynamic_cast(object.get()); if (compositeViewer) @@ -363,7 +363,7 @@ bool Viewer::checkNeedToDoFrame() // check if events are available and need processing if (checkEvents()) return true; - + // now check if any of the event handles have prompted a redraw. if (_requestRedraw) return true; if (_requestContinousUpdate) return true; @@ -395,7 +395,7 @@ bool Viewer::checkEvents() { if ((*witr)->checkEvents()) return true; } - + return false; } @@ -678,7 +678,7 @@ void Viewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEventAdapte double master_max_x = 1.0; double master_min_y = -1.0; double master_max_y = 1.0; - + osg::Matrix masterCameraVPW = getCamera()->getViewMatrix() * getCamera()->getProjectionMatrix(); if (getCamera()->getViewport()) { @@ -758,8 +758,8 @@ void Viewer::generateSlavePointerData(osg::Camera* camera, osgGA::GUIEventAdapte } } } - - + + void Viewer::generatePointerData(osgGA::GUIEventAdapter& event) { osgViewer::GraphicsWindow* gw = dynamic_cast(event.getGraphicsContext()); @@ -770,7 +770,7 @@ void Viewer::generatePointerData(osgGA::GUIEventAdapter& event) bool invert_y = event.getMouseYOrientation()==osgGA::GUIEventAdapter::Y_INCREASING_DOWNWARDS; if (invert_y && gw->getTraits()) y = gw->getTraits()->height - y; - + event.addPointerData(new osgGA::PointerData(gw, x, 0, gw->getTraits()->width, y, 0, gw->getTraits()->height)); @@ -822,7 +822,7 @@ void Viewer::reprojectPointerData(osgGA::GUIEventAdapter& source_event, osgGA::G osg::Viewport* viewport = camera ? camera->getViewport() : 0; if (!viewport) return; - + dest_event.addPointerData(new osgGA::PointerData(camera, (x-viewport->x())/viewport->width()*2.0f-1.0f, -1.0, 1.0, (y-viewport->y())/viewport->height()*2.0f-1.0f, -1.0, 1.0)); @@ -838,7 +838,7 @@ void Viewer::eventTraversal() if (_done) return; double cutOffTime = _frameStamp->getReferenceTime(); - + double beginEventTraversal = osg::Timer::instance()->delta_s(_startTick, osg::Timer::instance()->tick()); // OSG_NOTICE<<"Viewer::frameEventTraversal()."<copyPointerDataFrom(*event); - + break; } default: event->copyPointerDataFrom(*eventState); break; } - + events.push_back(event); } - + for(itr = gw_events.begin(); itr != gw_events.end(); ++itr) @@ -1174,13 +1174,13 @@ void Viewer::updateTraversal() } } -void Viewer::getScenes(Scenes& scenes, bool onlyValid) +void Viewer::getScenes(Scenes& scenes, bool /*onlyValid*/) { scenes.clear(); scenes.push_back(_scene.get()); } -void Viewer::getViews(Views& views, bool onlyValid) +void Viewer::getViews(Views& views, bool /*onlyValid*/) { views.clear(); views.push_back(this); diff --git a/src/osgVolume/FixedFunctionTechnique.cpp b/src/osgVolume/FixedFunctionTechnique.cpp index 12cfd8493..ba97c43dc 100644 --- a/src/osgVolume/FixedFunctionTechnique.cpp +++ b/src/osgVolume/FixedFunctionTechnique.cpp @@ -247,7 +247,7 @@ void FixedFunctionTechnique::init() _node = texgenNode_0; } -void FixedFunctionTechnique::update(osgUtil::UpdateVisitor* uv) +void FixedFunctionTechnique::update(osgUtil::UpdateVisitor* /*uv*/) { // OSG_NOTICE<<"FixedFunctionTechnique:update(osgUtil::UpdateVisitor* nv):"< Corners; Corners corners; diff --git a/src/osgVolume/RayTracedTechnique.cpp b/src/osgVolume/RayTracedTechnique.cpp index 63e6159a9..bf7d4ba48 100644 --- a/src/osgVolume/RayTracedTechnique.cpp +++ b/src/osgVolume/RayTracedTechnique.cpp @@ -532,7 +532,7 @@ void RayTracedTechnique::init() } } -void RayTracedTechnique::update(osgUtil::UpdateVisitor* uv) +void RayTracedTechnique::update(osgUtil::UpdateVisitor* /*uv*/) { // OSG_NOTICE<<"RayTracedTechnique:update(osgUtil::UpdateVisitor* nv):"<(getParent()); if(!parent) return; @@ -50,7 +50,7 @@ void Frame::Corner::parented(Window* window) { if(parent->canResize()) setEventMask(EVENT_MASK_MOUSE_DRAG); } -bool Frame::Corner::mouseDrag(double x, double y, const WindowManager* wm) +bool Frame::Corner::mouseDrag(double x, double y, const WindowManager* /*wm*/) { Frame* parent = dynamic_cast(getParent()); @@ -88,7 +88,7 @@ _border (border._border) { } -void Frame::Border::parented(Window* window) { +void Frame::Border::parented(Window* /*window*/) { Frame* parent = dynamic_cast(getParent()); if(!parent) return; @@ -137,7 +137,7 @@ void Frame::Border::positioned() } } -bool Frame::Border::mouseDrag(double x, double y, const WindowManager* wm) +bool Frame::Border::mouseDrag(double x, double y, const WindowManager* /*wm*/) { Frame* parent = dynamic_cast(getParent()); diff --git a/src/osgWidget/Input.cpp b/src/osgWidget/Input.cpp index 7b5658830..8a6534cd8 100644 --- a/src/osgWidget/Input.cpp +++ b/src/osgWidget/Input.cpp @@ -94,6 +94,8 @@ void Input::_calculateSize(const XYCoord& size) { if(width > getWidth()) setWidth(osg::round(width)); if(height > getHeight()) setHeight(osg::round(height)); +#else + OSG_UNUSED(size); #endif } @@ -281,11 +283,11 @@ void Input::positioned() } } -bool Input::keyUp(int key, int mask, const WindowManager*) { +bool Input::keyUp(int /*key*/, int /*mask*/, const WindowManager*) { return false; } -bool Input::mouseDrag (double x, double y, const WindowManager*) +bool Input::mouseDrag (double x, double /*y*/, const WindowManager*) { _mouseClickX += x; x = _mouseClickX; @@ -306,7 +308,7 @@ bool Input::mouseDrag (double x, double y, const WindowManager*) return true; } -bool Input::mousePush (double x, double y, const WindowManager* wm) +bool Input::mousePush (double x, double /*y*/, const WindowManager* /*wm*/) { double offset = getOrigin().x(); Window* window = getParent(); diff --git a/src/osgWidget/Lua.cpp b/src/osgWidget/Lua.cpp index 9def84f2a..f84b3d7bd 100644 --- a/src/osgWidget/Lua.cpp +++ b/src/osgWidget/Lua.cpp @@ -142,6 +142,7 @@ bool LuaEngine::eval(const std::string& code) { return true; #else + OSG_UNUSED(code); return noLuaFail("Can't evaluate code in LuaEngine"); #endif } @@ -163,6 +164,7 @@ bool LuaEngine::runFile(const std::string& filePath) { return true; #else + OSG_UNUSED(filePath); return noLuaFail("Can't run file in LuaEngine"); #endif } diff --git a/src/osgWidget/Python.cpp b/src/osgWidget/Python.cpp index 979d631d3..21bc757d9 100644 --- a/src/osgWidget/Python.cpp +++ b/src/osgWidget/Python.cpp @@ -156,6 +156,7 @@ bool PythonEngine::eval(const std::string& code) { return true; #else + OSG_UNUSED(code); return noPythonFail("Can't evaluate code in PythonEngine"); #endif } @@ -207,6 +208,7 @@ bool PythonEngine::runFile(const std::string& filePath) { return true; #else + OSG_UNUSED(filePath); return noPythonFail("Can't evaluate code in PythonEngine"); #endif } diff --git a/src/osgWidget/StyleManager.cpp b/src/osgWidget/StyleManager.cpp index 047ffc283..b59dbbbde 100644 --- a/src/osgWidget/StyleManager.cpp +++ b/src/osgWidget/StyleManager.cpp @@ -164,11 +164,11 @@ bool Style::applyStyle(Widget* widget, Reader r) { return true; } -bool Style::applyStyle(Label* label, Reader r) { +bool Style::applyStyle(Label* /*label*/, Reader /*r*/) { return false; } -bool Style::applyStyle(Input* input, Reader r) { +bool Style::applyStyle(Input* /*input*/, Reader /*r*/) { return false; } @@ -217,12 +217,12 @@ bool Style::applyStyle(Window* window, Reader r) { return true; } -bool Style::applyStyle(Canvas* label, Reader r) { +bool Style::applyStyle(Canvas* /*label*/, Reader /*r*/) { return false; } -bool Style::applyStyle(Window::EmbeddedWindow*, Reader r) { +bool Style::applyStyle(Window::EmbeddedWindow*, Reader /*r*/) { return false; } @@ -232,11 +232,11 @@ bool Style::applyStyle(Box* box, Reader r) { return false; } -bool Style::applyStyle(Frame::Corner*, Reader r) { +bool Style::applyStyle(Frame::Corner*, Reader /*r*/) { return false; } -bool Style::applyStyle(Frame::Border*, Reader r) { +bool Style::applyStyle(Frame::Border*, Reader /*r*/) { return false; } diff --git a/src/osgWidget/ViewerEventHandlers.cpp b/src/osgWidget/ViewerEventHandlers.cpp index 5abd37635..1c3f23a2d 100644 --- a/src/osgWidget/ViewerEventHandlers.cpp +++ b/src/osgWidget/ViewerEventHandlers.cpp @@ -10,9 +10,9 @@ _wm(wm) { bool MouseHandler::handle( const osgGA::GUIEventAdapter& gea, - osgGA::GUIActionAdapter& gaa, - osg::Object* obj, - osg::NodeVisitor* nv + osgGA::GUIActionAdapter& /*gaa*/, + osg::Object* /*obj*/, + osg::NodeVisitor* /*nv*/ ) { osgGA::GUIEventAdapter::EventType ev = gea.getEventType(); MouseAction ma = _isMouseEvent(ev); @@ -78,15 +78,15 @@ bool MouseHandler::_handleMouseRelease(float x, float y, int button) { else return false; } -bool MouseHandler::_handleMouseDoubleClick(float x, float y, int button) { +bool MouseHandler::_handleMouseDoubleClick(float /*x*/, float /*y*/, int /*button*/) { return false; } -bool MouseHandler::_handleMouseDrag(float x, float y, int button) { +bool MouseHandler::_handleMouseDrag(float x, float y, int /*button*/) { return _doMouseEvent(x, y, &WindowManager::pointerDrag); } -bool MouseHandler::_handleMouseMove(float x, float y, int button) { +bool MouseHandler::_handleMouseMove(float x, float y, int /*button*/) { return _doMouseEvent(x, y, &WindowManager::pointerMove); } @@ -139,9 +139,9 @@ _wm(wm) { bool KeyboardHandler::handle( const osgGA::GUIEventAdapter& gea, - osgGA::GUIActionAdapter& gaa, - osg::Object* obj, - osg::NodeVisitor* nv + osgGA::GUIActionAdapter& /*gaa*/, + osg::Object* /*obj*/, + osg::NodeVisitor* /*nv*/ ) { osgGA::GUIEventAdapter::EventType ev = gea.getEventType(); @@ -170,9 +170,9 @@ _camera (camera) { bool ResizeHandler::handle( const osgGA::GUIEventAdapter& gea, - osgGA::GUIActionAdapter& gaa, - osg::Object* obj, - osg::NodeVisitor* nv + osgGA::GUIActionAdapter& /*gaa*/, + osg::Object* /*obj*/, + osg::NodeVisitor* /*nv*/ ) { osgGA::GUIEventAdapter::EventType ev = gea.getEventType(); @@ -201,8 +201,8 @@ _camera (camera) { bool CameraSwitchHandler::handle( const osgGA::GUIEventAdapter& gea, osgGA::GUIActionAdapter& gaa, - osg::Object* obj, - osg::NodeVisitor* nv + osg::Object* /*obj*/, + osg::NodeVisitor* /*nv*/ ) { if( gea.getEventType() != osgGA::GUIEventAdapter::KEYDOWN || diff --git a/src/osgWidget/Window.cpp b/src/osgWidget/Window.cpp index ac594bdd3..6f9f99cd4 100644 --- a/src/osgWidget/Window.cpp +++ b/src/osgWidget/Window.cpp @@ -883,7 +883,7 @@ void Window::managed(WindowManager* wm) { update(); } -void Window::unmanaged(WindowManager* wm) { +void Window::unmanaged(WindowManager* /*wm*/) { for(Iterator i = begin(); i != end(); i++) _setManaged(i->get(), true); _wm = 0; @@ -911,7 +911,7 @@ bool Window::removeWidget(Widget* widget) { return false; } -bool Window::replaceWidget(Widget* oldWidget, Widget* newWidget) { +bool Window::replaceWidget(Widget* /*oldWidget*/, Widget* /*newWidget*/) { return false; } diff --git a/src/osgWidget/WindowManager.cpp b/src/osgWidget/WindowManager.cpp index 6b98f12b7..7bccbd348 100644 --- a/src/osgWidget/WindowManager.cpp +++ b/src/osgWidget/WindowManager.cpp @@ -163,7 +163,7 @@ bool WindowManager::_handleMousePushed(float x, float y, bool& down) { return _lastPush->callMethodAndCallbacks(ev); } -bool WindowManager::_handleMouseReleased(float x, float y, bool& down) { +bool WindowManager::_handleMouseReleased(float /*x*/, float /*y*/, bool& down) { down = false; // If were were in a drag state, reset our boolean flag. @@ -300,14 +300,14 @@ bool WindowManager::pickAtXY(float x, float y, WidgetList& wl) { Intersections intr; - + osg::Camera* camera = _view->getCamera(); osgViewer::GraphicsWindow* gw = dynamic_cast(camera->getGraphicsContext()); if (gw) { _view->computeIntersections(camera, osgUtil::Intersector::WINDOW, x, y, intr, _nodeMask); } - + if (!intr.empty()) { // Get the first Window at the XY coordinates; if you want a Window to be