Warnings fixes for VS.

This commit is contained in:
Robert Osfield 2009-02-02 20:35:19 +00:00
parent 965b7ddc72
commit 1153ea5feb
20 changed files with 155 additions and 11 deletions

View File

@ -288,6 +288,8 @@ namespace osgIntrospection
private: private:
const Type& _type; const Type& _type;
PropertyTypeAttribute& operator = (const PropertyTypeAttribute&) { return *this; }
}; };
/// Attribute for overriding the type of an index (of an indexed /// Attribute for overriding the type of an index (of an indexed
@ -313,6 +315,9 @@ namespace osgIntrospection
} }
private: private:
IndexTypeAttribute& operator = (const IndexTypeAttribute&) { return *this; }
int _wi; int _wi;
const Type& _type; const Type& _type;
}; };

View File

@ -92,6 +92,9 @@ namespace osgIntrospection
virtual void getInheritedProviders(CustomAttributeProviderList& providers) const; virtual void getInheritedProviders(CustomAttributeProviderList& providers) const;
private: private:
ConstructorInfo& operator = (const ConstructorInfo&) { return *this; }
const Type& _declarationType; const Type& _declarationType;
ParameterInfoList _params; ParameterInfoList _params;
bool _explicit; bool _explicit;

View File

@ -114,6 +114,9 @@ namespace osgIntrospection
inline Value invoke() const; inline Value invoke() const;
private: private:
MethodInfo& operator = (const MethodInfo&) { return *this; }
inline std::string strip_namespace(const std::string& s) const; inline std::string strip_namespace(const std::string& s) const;
virtual void getInheritedProviders(CustomAttributeProviderList& providers) const; virtual void getInheritedProviders(CustomAttributeProviderList& providers) const;

View File

@ -68,6 +68,9 @@ namespace osgIntrospection
inline bool isInOut() const { return isIn() && isOut(); } inline bool isInOut() const { return isIn() && isOut(); }
private: private:
ParameterInfo& operator = (const ParameterInfo&) { return *this; }
std::string _name; std::string _name;
const Type& _type; const Type& _type;
int attribs_; int attribs_;

View File

@ -360,6 +360,9 @@ namespace osgIntrospection
virtual void getInheritedProviders(CustomAttributeProviderList& providers) const; virtual void getInheritedProviders(CustomAttributeProviderList& providers) const;
private: private:
PropertyInfo& operator = (const PropertyInfo&) { return *this; }
const Type& _declarationType; const Type& _declarationType;
const Type& _ptype; const Type& _ptype;
std::string _name; std::string _name;

View File

@ -177,9 +177,22 @@ namespace osgIntrospection
struct Instance: Instance_base struct Instance: Instance_base
{ {
Instance(T data): _data(data) {} Instance(T data): _data(data) {}
virtual Instance_base *clone() const { return new Instance<T>(*this); } virtual Instance_base *clone() const { return new Instance<T>(*this); }
virtual ~Instance() {} virtual ~Instance() {}
T _data; T _data;
protected:
Instance& operator = (const Instance& rhs)
{
if (&rhs!=this)
{
_data = rhs._data;
}
return *this;
}
}; };
// Base class for storage of Instance objects. Actually three // Base class for storage of Instance objects. Actually three
@ -261,6 +274,9 @@ namespace osgIntrospection
private: private:
bool nullptr_; bool nullptr_;
Instance_box& operator = (const Instance_box&) { return *this; }
}; };
// Generic instance box for pointer values. Unlike Instance_box<>, // Generic instance box for pointer values. Unlike Instance_box<>,

View File

@ -59,6 +59,9 @@ class DrawShapeVisitor : public ConstShapeVisitor
const TessellationHints* _hints; const TessellationHints* _hints;
protected: protected:
DrawShapeVisitor& operator = (const DrawShapeVisitor&) { return *this; }
enum SphereHalf { SphereTopHalf, SphereBottomHalf }; enum SphereHalf { SphereTopHalf, SphereBottomHalf };
// helpers for apply( Cylinder | Sphere | Capsule ) // helpers for apply( Cylinder | Sphere | Capsule )
@ -1055,6 +1058,11 @@ class ComputeBoundShapeVisitor : public ConstShapeVisitor
virtual void apply(const CompositeShape&); virtual void apply(const CompositeShape&);
BoundingBox& _bb; BoundingBox& _bb;
protected:
ComputeBoundShapeVisitor& operator = (const ComputeBoundShapeVisitor&) { return *this; }
}; };
@ -1322,6 +1330,9 @@ class PrimitiveShapeVisitor : public ConstShapeVisitor
const TessellationHints* _hints; const TessellationHints* _hints;
private: private:
PrimitiveShapeVisitor& operator = (const PrimitiveShapeVisitor&) { return *this; }
// helpers for apply( Cylinder | Sphere | Capsule ) // helpers for apply( Cylinder | Sphere | Capsule )
void createCylinderBody(unsigned int numSegments, float radius, float height, const osg::Matrix& matrix); void createCylinderBody(unsigned int numSegments, float radius, float height, const osg::Matrix& matrix);
void createHalfSphere(unsigned int numSegments, unsigned int numRows, float radius, int which, float zOffset, const osg::Matrix& matrix); void createHalfSphere(unsigned int numSegments, unsigned int numRows, float radius, int which, float zOffset, const osg::Matrix& matrix);

View File

@ -39,8 +39,6 @@ class TransformVisitor : public NodeVisitor
_ignoreCameras(ignoreCameras) _ignoreCameras(ignoreCameras)
{} {}
META_NodeVisitor("osg","TransformVisitor")
virtual void apply(Transform& transform) virtual void apply(Transform& transform)
{ {
if (_coordMode==LOCAL_TO_WORLD) if (_coordMode==LOCAL_TO_WORLD)
@ -86,6 +84,10 @@ class TransformVisitor : public NodeVisitor
} }
} }
protected:
TransformVisitor& operator = (const TransformVisitor&) { return *this; }
}; };
Matrix osg::computeLocalToWorld(const NodePath& nodePath, bool ignoreCameras) Matrix osg::computeLocalToWorld(const NodePath& nodePath, bool ignoreCameras)

View File

@ -257,6 +257,10 @@ public:
std::set<osg::ref_ptr<osg::Texture> > _textureSet; std::set<osg::ref_ptr<osg::Texture> > _textureSet;
std::set<osg::ref_ptr<osg::Drawable> > _drawableSet; std::set<osg::ref_ptr<osg::Drawable> > _drawableSet;
osg::ref_ptr<osg::KdTreeBuilder> _kdTreeBuilder; osg::ref_ptr<osg::KdTreeBuilder> _kdTreeBuilder;
protected:
FindCompileableGLObjectsVisitor& operator = (const FindCompileableGLObjectsVisitor&) { return *this; }
}; };

View File

@ -920,6 +920,10 @@ struct ActivateTransparencyOnType
} }
const std::type_info& _t; const std::type_info& _t;
protected:
ActivateTransparencyOnType& operator = (const ActivateTransparencyOnType&) { return *this; }
}; };
struct DeactivateTransparencyOnType struct DeactivateTransparencyOnType
@ -938,6 +942,10 @@ struct DeactivateTransparencyOnType
} }
const std::type_info& _t; const std::type_info& _t;
protected:
DeactivateTransparencyOnType& operator = (const DeactivateTransparencyOnType&) { return *this; }
}; };
void SphereSegment::setSurfaceColor(const osg::Vec4& c) void SphereSegment::setSurfaceColor(const osg::Vec4& c)
@ -1190,6 +1198,10 @@ namespace SphereSegmentIntersector
} }
VertexArray& _vertices; VertexArray& _vertices;
protected:
SortFunctor& operator = (const SortFunctor&) { return *this; }
}; };
@ -2600,6 +2612,10 @@ namespace SphereSegmentIntersector
{ {
return _lowerOutside ? _plane.distance(v) : -_plane.distance(v) ; return _lowerOutside ? _plane.distance(v) : -_plane.distance(v) ;
} }
protected:
AzimPlaneIntersector& operator = (const AzimPlaneIntersector&) { return *this; }
}; };
struct ElevationIntersector struct ElevationIntersector
@ -2738,6 +2754,10 @@ namespace SphereSegmentIntersector
return _lowerOutside ? computedElev-_elev : _elev-computedElev ; return _lowerOutside ? computedElev-_elev : _elev-computedElev ;
} }
protected:
ElevationIntersector& operator = (const ElevationIntersector&) { return *this; }
}; };
struct RadiusIntersector struct RadiusIntersector
@ -2864,6 +2884,10 @@ namespace SphereSegmentIntersector
} }
protected:
RadiusIntersector& operator = (const RadiusIntersector&) { return *this; }
}; };
} }

View File

@ -54,6 +54,10 @@ struct look_ahead_iterator
const std::string& _string; const std::string& _string;
unsigned int _index; unsigned int _index;
unsigned char _nullCharacter; unsigned char _nullCharacter;
protected:
look_ahead_iterator& operator = (const look_ahead_iterator&) { return *this; }
}; };
String::Encoding findEncoding(look_ahead_iterator& charString,String::Encoding overrideEncoding) String::Encoding findEncoding(look_ahead_iterator& charString,String::Encoding overrideEncoding)

View File

@ -85,6 +85,8 @@ class PrintVisitor : public NodeVisitor
protected: protected:
PrintVisitor& operator = (const PrintVisitor&) { return *this; }
std::ostream& _out; std::ostream& _out;
int _indent; int _indent;
int _step; int _step;

View File

@ -117,7 +117,7 @@ public:
} }
}; };
Edge() {} Edge(): ib_(0), ie_(0), ibs_(0), ies_(0), duplicate_(false) {}
Edge(Vertex_index ib, Vertex_index ie) : ib_(ib), ie_(ie), ibs_(osg::minimum(ib, ie)), ies_(osg::maximum(ib, ie)), duplicate_(false) {} Edge(Vertex_index ib, Vertex_index ie) : ib_(ib), ie_(ie), ibs_(osg::minimum(ib, ie)), ies_(osg::maximum(ib, ie)), duplicate_(false) {}
// first endpoint // first endpoint
@ -150,6 +150,13 @@ private:
class Triangle class Triangle
{ {
public: public:
Triangle():
a_(0),
b_(0),
c_(0) {}
Triangle(Vertex_index a, Vertex_index b, Vertex_index c, osg::Vec3Array *points) Triangle(Vertex_index a, Vertex_index b, Vertex_index c, osg::Vec3Array *points)
: a_(a), : a_(a),
b_(b), b_(b),
@ -161,6 +168,21 @@ public:
edge_[2] = Edge(c_, a_); edge_[2] = Edge(c_, a_);
} }
Triangle& operator = (const Triangle& rhs)
{
if (&rhs==this) return *this;
a_ = rhs.a_;
b_ = rhs.b_;
c_ = rhs.c_;
cc_ = rhs.cc_;
edge_[0] = rhs.edge_[0];
edge_[1] = rhs.edge_[1];
edge_[2] = rhs.edge_[2];
return *this;
}
inline Vertex_index a() const { return a_; } inline Vertex_index a() const { return a_; }
inline Vertex_index b() const { return b_; } inline Vertex_index b() const { return b_; }
inline Vertex_index c() const { return c_; } inline Vertex_index c() const { return c_; }
@ -321,6 +343,7 @@ public:
private: private:
bool intersect(const osg::Vec2 p1,const osg::Vec2 p2,const osg::Vec2 p3,const osg::Vec2 p4) const bool intersect(const osg::Vec2 p1,const osg::Vec2 p2,const osg::Vec2 p3,const osg::Vec2 p4) const
{ {
// intersection point of p1,p2 and p3,p4 // intersection point of p1,p2 and p3,p4

View File

@ -428,6 +428,10 @@ class CopyVertexArrayToPointsVisitor : public osg::ArrayVisitor
} }
EdgeCollector::PointList& _pointList; EdgeCollector::PointList& _pointList;
protected:
CopyVertexArrayToPointsVisitor& operator = (const CopyVertexArrayToPointsVisitor&) { return *this; }
}; };
EdgeCollector::~EdgeCollector() EdgeCollector::~EdgeCollector()

View File

@ -418,6 +418,11 @@ struct TriangleHit
const osg::Vec3* _v2; const osg::Vec3* _v2;
float _r3; float _r3;
const osg::Vec3* _v3; const osg::Vec3* _v3;
protected:
TriangleHit& operator = (const TriangleHit&) { return *this; }
}; };

View File

@ -46,6 +46,10 @@ namespace LineSegmentIntersectorUtils
const osg::Vec3* _v2; const osg::Vec3* _v2;
float _r3; float _r3;
const osg::Vec3* _v3; const osg::Vec3* _v3;
protected:
TriangleIntersection& operator = (const TriangleIntersection&) { return *this; }
}; };
typedef std::multimap<float,TriangleIntersection> TriangleIntersections; typedef std::multimap<float,TriangleIntersection> TriangleIntersections;

View File

@ -1348,6 +1348,11 @@ class CopyArrayToPointsVisitor : public osg::ArrayVisitor
} }
EdgeCollapse::PointList& _pointList; EdgeCollapse::PointList& _pointList;
protected:
CopyArrayToPointsVisitor& operator = (const CopyArrayToPointsVisitor&) { return *this; }
}; };
class CopyVertexArrayToPointsVisitor : public osg::ArrayVisitor class CopyVertexArrayToPointsVisitor : public osg::ArrayVisitor
@ -1400,6 +1405,11 @@ class CopyVertexArrayToPointsVisitor : public osg::ArrayVisitor
} }
EdgeCollapse::PointList& _pointList; EdgeCollapse::PointList& _pointList;
protected:
CopyVertexArrayToPointsVisitor& operator = (const CopyVertexArrayToPointsVisitor&) { return *this; }
}; };
void EdgeCollapse::setGeometry(osg::Geometry* geometry, const Simplifier::IndexList& protectedPoints) void EdgeCollapse::setGeometry(osg::Geometry* geometry, const Simplifier::IndexList& protectedPoints)
@ -1567,6 +1577,10 @@ class CopyPointsToArrayVisitor : public osg::ArrayVisitor
EdgeCollapse::PointList& _pointList; EdgeCollapse::PointList& _pointList;
unsigned int _index; unsigned int _index;
protected:
CopyPointsToArrayVisitor& operator = (CopyPointsToArrayVisitor&) { return *this; }
}; };
class NormalizeArrayVisitor : public osg::ArrayVisitor class NormalizeArrayVisitor : public osg::ArrayVisitor
@ -1633,6 +1647,10 @@ class CopyPointsToVertexArrayVisitor : public osg::ArrayVisitor
} }
EdgeCollapse::PointList& _pointList; EdgeCollapse::PointList& _pointList;
protected:
CopyPointsToVertexArrayVisitor& operator = (CopyPointsToArrayVisitor&) { return *this; }
}; };

View File

@ -46,6 +46,10 @@ class WriteValue : public osg::ConstValueVisitor
virtual void apply(const Vec2& v) { _o << v; } virtual void apply(const Vec2& v) { _o << v; }
virtual void apply(const Vec3& v) { _o << v; } virtual void apply(const Vec3& v) { _o << v; }
virtual void apply(const Vec4& v) { _o << v; } virtual void apply(const Vec4& v) { _o << v; }
protected:
WriteValue& operator = (const WriteValue&) { return *this; }
}; };
@ -129,6 +133,10 @@ struct VertexAttribComparitor
} }
} }
protected:
VertexAttribComparitor& operator = (const VertexAttribComparitor&) { return *this; }
}; };
class RemapArray : public osg::ArrayVisitor class RemapArray : public osg::ArrayVisitor
@ -163,6 +171,10 @@ class RemapArray : public osg::ArrayVisitor
virtual void apply(osg::Vec2Array& array) { remap(array); } virtual void apply(osg::Vec2Array& array) { remap(array); }
virtual void apply(osg::Vec3Array& array) { remap(array); } virtual void apply(osg::Vec3Array& array) { remap(array); }
virtual void apply(osg::Vec4Array& array) { remap(array); } virtual void apply(osg::Vec4Array& array) { remap(array); }
protected:
RemapArray& operator = (const RemapArray&) { return *this; }
}; };
struct MyTriangleOperator struct MyTriangleOperator

View File

@ -194,6 +194,9 @@ public:
// friend void swap(_mytype & Left, _mytype & Right) { Left.swap(Right); } // friend void swap(_mytype & Left, _mytype & Right) { Left.swap(Right); }
protected: protected:
graph_array& operator = (const graph_array&) { return *this; }
size_t m_NbArcs; size_t m_NbArcs;
std::vector<node> m_Nodes; std::vector<node> m_Nodes;
}; };

View File

@ -189,7 +189,6 @@ class TemporaryWindow: public osg::Referenced
{ {
public: public:
TemporaryWindow(); TemporaryWindow();
TemporaryWindow(const TemporaryWindow &);
HWND getHandle() const { return _handle; } HWND getHandle() const { return _handle; }
HDC getDC() const { return _dc; } HDC getDC() const { return _dc; }
@ -199,6 +198,7 @@ public:
protected: protected:
~TemporaryWindow(); ~TemporaryWindow();
TemporaryWindow(const TemporaryWindow &) {}
TemporaryWindow &operator=(const TemporaryWindow &) { return *this; } TemporaryWindow &operator=(const TemporaryWindow &) { return *this; }
void create(); void create();
@ -221,11 +221,6 @@ TemporaryWindow::TemporaryWindow()
create(); create();
} }
TemporaryWindow::TemporaryWindow(const TemporaryWindow &)
{
throw "This is TemporaryWindow, please don't copy me!";
}
void TemporaryWindow::create() void TemporaryWindow::create()
{ {
std::ostringstream oss; std::ostringstream oss;