From Eric Sokolowsky, warning fixes for g++ 4.0 under Fedora Core 4.
This commit is contained in:
parent
fb96298355
commit
d154c2a4cd
@ -286,6 +286,7 @@ class ArrayVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArrayVisitor() {}
|
ArrayVisitor() {}
|
||||||
|
virtual ~ArrayVisitor() {}
|
||||||
|
|
||||||
virtual void apply(Array&) {}
|
virtual void apply(Array&) {}
|
||||||
virtual void apply(ByteArray&) {}
|
virtual void apply(ByteArray&) {}
|
||||||
@ -315,6 +316,7 @@ class ConstArrayVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConstArrayVisitor() {}
|
ConstArrayVisitor() {}
|
||||||
|
virtual ~ConstArrayVisitor() {}
|
||||||
|
|
||||||
virtual void apply(const Array&) {}
|
virtual void apply(const Array&) {}
|
||||||
virtual void apply(const ByteArray&) {}
|
virtual void apply(const ByteArray&) {}
|
||||||
@ -345,6 +347,7 @@ class ValueVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ValueVisitor() {}
|
ValueVisitor() {}
|
||||||
|
virtual ~ValueVisitor() {}
|
||||||
|
|
||||||
virtual void apply(GLbyte&) {}
|
virtual void apply(GLbyte&) {}
|
||||||
virtual void apply(GLshort&) {}
|
virtual void apply(GLshort&) {}
|
||||||
@ -374,6 +377,7 @@ class ConstValueVisitor
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConstValueVisitor() {}
|
ConstValueVisitor() {}
|
||||||
|
virtual ~ConstValueVisitor() {}
|
||||||
|
|
||||||
virtual void apply(const GLbyte&) {}
|
virtual void apply(const GLbyte&) {}
|
||||||
virtual void apply(const GLshort&) {}
|
virtual void apply(const GLshort&) {}
|
||||||
|
@ -104,6 +104,7 @@ class ShapeVisitor
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
ShapeVisitor() {}
|
ShapeVisitor() {}
|
||||||
|
virtual ~ShapeVisitor() {}
|
||||||
|
|
||||||
virtual void apply(Sphere&) {}
|
virtual void apply(Sphere&) {}
|
||||||
virtual void apply(Box&) {}
|
virtual void apply(Box&) {}
|
||||||
@ -124,6 +125,7 @@ class ConstShapeVisitor
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
ConstShapeVisitor() {}
|
ConstShapeVisitor() {}
|
||||||
|
virtual ~ConstShapeVisitor() {}
|
||||||
|
|
||||||
virtual void apply(const Sphere&) {}
|
virtual void apply(const Sphere&) {}
|
||||||
virtual void apply(const Box&) {}
|
virtual void apply(const Box&) {}
|
||||||
|
@ -258,6 +258,7 @@ class OSG_EXPORT StateAttribute : public Object
|
|||||||
|
|
||||||
struct ModeUsage
|
struct ModeUsage
|
||||||
{
|
{
|
||||||
|
virtual ~ModeUsage() {}
|
||||||
virtual void usesMode(GLMode mode) = 0;
|
virtual void usesMode(GLMode mode) = 0;
|
||||||
virtual void usesTextureMode(GLMode mode) = 0;
|
virtual void usesTextureMode(GLMode mode) = 0;
|
||||||
};
|
};
|
||||||
|
@ -31,6 +31,7 @@ namespace osgDB {
|
|||||||
|
|
||||||
/** basic structure for custom runtime inheritance checking */
|
/** basic structure for custom runtime inheritance checking */
|
||||||
struct basic_type_wrapper {
|
struct basic_type_wrapper {
|
||||||
|
virtual ~basic_type_wrapper() {}
|
||||||
virtual bool matches(const osg::Object *proto) const = 0;
|
virtual bool matches(const osg::Object *proto) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ then you then respond the flag being set in your own leisure.
|
|||||||
class GUIActionAdapter
|
class GUIActionAdapter
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~GUIActionAdapter() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
requestRedraw() requests a single redraw.
|
requestRedraw() requests a single redraw.
|
||||||
|
@ -104,7 +104,7 @@ bool LOD::addChild( Node *child )
|
|||||||
if (_children.size()>_rangeList.size())
|
if (_children.size()>_rangeList.size())
|
||||||
{
|
{
|
||||||
float maxRange = !_rangeList.empty()?
|
float maxRange = !_rangeList.empty()?
|
||||||
maxRange=_rangeList.back().second : 0.0f;
|
_rangeList.back().second : 0.0f;
|
||||||
|
|
||||||
_rangeList.resize(_children.size(),MinMaxPair(maxRange,maxRange));
|
_rangeList.resize(_children.size(),MinMaxPair(maxRange,maxRange));
|
||||||
}
|
}
|
||||||
|
@ -612,6 +612,7 @@ ReaderWriter* Registry::getReaderWriterForExtension(const std::string& ext)
|
|||||||
|
|
||||||
struct concrete_wrapper: basic_type_wrapper
|
struct concrete_wrapper: basic_type_wrapper
|
||||||
{
|
{
|
||||||
|
virtual ~concrete_wrapper() {}
|
||||||
concrete_wrapper(const osg::Object *myobj) : myobj_(myobj) {}
|
concrete_wrapper(const osg::Object *myobj) : myobj_(myobj) {}
|
||||||
bool matches(const osg::Object *proto) const
|
bool matches(const osg::Object *proto) const
|
||||||
{
|
{
|
||||||
|
@ -116,6 +116,7 @@ namespace ive {
|
|||||||
class ReadWrite{
|
class ReadWrite{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
virtual ~ReadWrite() {}
|
||||||
virtual void write(DataOutputStream* out) const = 0;
|
virtual void write(DataOutputStream* out) const = 0;
|
||||||
virtual void read(DataInputStream* out) const = 0;
|
virtual void read(DataInputStream* out) const = 0;
|
||||||
};
|
};
|
||||||
|
@ -570,7 +570,7 @@ osg::Drawable* ReaderWriter3DS::ReaderObject::createDrawable(Lib3dsMesh *m,Fac
|
|||||||
// create normals.
|
// create normals.
|
||||||
if (_usePerVertexNormals)
|
if (_usePerVertexNormals)
|
||||||
{
|
{
|
||||||
osg::Vec3Array* osg_normals=osg_normals = new osg::Vec3Array(noVertex);
|
osg::Vec3Array* osg_normals = new osg::Vec3Array(noVertex);
|
||||||
|
|
||||||
// initialize normal list to zero's.
|
// initialize normal list to zero's.
|
||||||
for (i=0; i<noVertex; ++i)
|
for (i=0; i<noVertex; ++i)
|
||||||
@ -692,7 +692,8 @@ osg::Texture2D* ReaderWriter3DS::ReaderObject::createTexture(Lib3dsTextureMap *
|
|||||||
|
|
||||||
// what is the wrap mode of the texture.
|
// what is the wrap mode of the texture.
|
||||||
osg::Texture2D::WrapMode wm = ((texture->flags)&LIB3DS_NO_TILE) ?
|
osg::Texture2D::WrapMode wm = ((texture->flags)&LIB3DS_NO_TILE) ?
|
||||||
osg::Texture2D::CLAMP : wm=osg::Texture2D::REPEAT;
|
osg::Texture2D::CLAMP :
|
||||||
|
osg::Texture2D::REPEAT;
|
||||||
osg_texture->setWrap(osg::Texture2D::WRAP_S,wm);
|
osg_texture->setWrap(osg::Texture2D::WRAP_S,wm);
|
||||||
osg_texture->setWrap(osg::Texture2D::WRAP_T,wm);
|
osg_texture->setWrap(osg::Texture2D::WRAP_T,wm);
|
||||||
osg_texture->setWrap(osg::Texture2D::WRAP_R,wm);
|
osg_texture->setWrap(osg::Texture2D::WRAP_R,wm);
|
||||||
|
@ -345,7 +345,7 @@ int *numComponents_ret)
|
|||||||
for (y = 0; y < height; y++)
|
for (y = 0; y < height; y++)
|
||||||
{
|
{
|
||||||
fin.read((char*)linebuf,width*depth);
|
fin.read((char*)linebuf,width*depth);
|
||||||
if (fin.gcount() != (unsigned int)width*depth)
|
if (fin.gcount() != (std::streamsize) (width*depth))
|
||||||
{
|
{
|
||||||
tgaerror = ERR_READ;
|
tgaerror = ERR_READ;
|
||||||
break;
|
break;
|
||||||
@ -384,7 +384,7 @@ int *numComponents_ret)
|
|||||||
}
|
}
|
||||||
src = buf;
|
src = buf;
|
||||||
fin.read((char*)buf,size);
|
fin.read((char*)buf,size);
|
||||||
if (fin.gcount() != (unsigned int) size)
|
if (fin.gcount() != (std::streamsize) size)
|
||||||
{
|
{
|
||||||
tgaerror = ERR_READ;
|
tgaerror = ERR_READ;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user