Skip to content

Commit

Permalink
From David Callu, warning fixes and removal of spaces at end of lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Jun 28, 2013
1 parent d827684 commit 097aedf
Show file tree
Hide file tree
Showing 100 changed files with 496 additions and 428 deletions.
4 changes: 4 additions & 0 deletions include/OpenThreads/Exports
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#endif
#endif

#ifndef OT_UNUSED
#define OT_UNUSED(var) (void) var
#endif

#endif


4 changes: 2 additions & 2 deletions include/osg/BufferObject
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 6 additions & 0 deletions include/osg/Export
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@
#endif
#endif

#ifndef OSG_UNUSED
#define OSG_UNUSED(var) (void) var
#endif



/**
\namespace osg
Expand Down
8 changes: 4 additions & 4 deletions include/osg/ImageStream
Original file line number Diff line number Diff line change
Expand Up @@ -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<osg::AudioStream> > 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() {}

Expand Down
18 changes: 9 additions & 9 deletions include/osg/TextureBuffer
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand All @@ -113,11 +113,11 @@ class OSG_EXPORT TextureBuffer : public Texture

typedef buffered_value<unsigned int> 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)
{
Expand All @@ -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 );
Expand All @@ -136,8 +136,8 @@ class OSG_EXPORT TextureBuffer : public Texture
GLenum _usageHint;
osg::GLBufferObject::Extensions* _extensions;
};
typedef osg::buffered_object<osg::ref_ptr<TextureBufferObject> > TextureBufferObjectList;

typedef osg::buffered_object<osg::ref_ptr<TextureBufferObject> > TextureBufferObjectList;
mutable TextureBufferObjectList _textureBufferObjects;
};

Expand Down
84 changes: 42 additions & 42 deletions include/osg/ValueObject
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
};
Expand Down
4 changes: 2 additions & 2 deletions include/osgAnimation/Action
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion include/osgAnimation/AnimationUpdateCallback
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace osgAnimation
META_Object(osgAnimation, AnimationUpdateCallback<T>);

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())
Expand Down
2 changes: 1 addition & 1 deletion include/osgAnimation/MorphGeometry
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
6 changes: 3 additions & 3 deletions include/osgDB/DatabaseRevisions
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down
Loading

0 comments on commit 097aedf

Please sign in to comment.