diff --git a/include/osgIntrospection/Attributes b/include/osgIntrospection/Attributes index d1166574a..38fba4f5a 100644 --- a/include/osgIntrospection/Attributes +++ b/include/osgIntrospection/Attributes @@ -288,6 +288,8 @@ namespace osgIntrospection private: const Type& _type; + + PropertyTypeAttribute& operator = (const PropertyTypeAttribute&) { return *this; } }; /// Attribute for overriding the type of an index (of an indexed @@ -313,6 +315,9 @@ namespace osgIntrospection } private: + + IndexTypeAttribute& operator = (const IndexTypeAttribute&) { return *this; } + int _wi; const Type& _type; }; diff --git a/include/osgIntrospection/ConstructorInfo b/include/osgIntrospection/ConstructorInfo index c6ffbb630..6534d981a 100644 --- a/include/osgIntrospection/ConstructorInfo +++ b/include/osgIntrospection/ConstructorInfo @@ -92,6 +92,9 @@ namespace osgIntrospection virtual void getInheritedProviders(CustomAttributeProviderList& providers) const; private: + + ConstructorInfo& operator = (const ConstructorInfo&) { return *this; } + const Type& _declarationType; ParameterInfoList _params; bool _explicit; diff --git a/include/osgIntrospection/MethodInfo b/include/osgIntrospection/MethodInfo index 002ccc14c..48a88e526 100644 --- a/include/osgIntrospection/MethodInfo +++ b/include/osgIntrospection/MethodInfo @@ -114,6 +114,9 @@ namespace osgIntrospection inline Value invoke() const; private: + + MethodInfo& operator = (const MethodInfo&) { return *this; } + inline std::string strip_namespace(const std::string& s) const; virtual void getInheritedProviders(CustomAttributeProviderList& providers) const; diff --git a/include/osgIntrospection/ParameterInfo b/include/osgIntrospection/ParameterInfo index 730de8a28..5164d2697 100644 --- a/include/osgIntrospection/ParameterInfo +++ b/include/osgIntrospection/ParameterInfo @@ -68,6 +68,9 @@ namespace osgIntrospection inline bool isInOut() const { return isIn() && isOut(); } private: + + ParameterInfo& operator = (const ParameterInfo&) { return *this; } + std::string _name; const Type& _type; int attribs_; diff --git a/include/osgIntrospection/PropertyInfo b/include/osgIntrospection/PropertyInfo index d6f6617b0..232f31b73 100644 --- a/include/osgIntrospection/PropertyInfo +++ b/include/osgIntrospection/PropertyInfo @@ -360,6 +360,9 @@ namespace osgIntrospection virtual void getInheritedProviders(CustomAttributeProviderList& providers) const; private: + + PropertyInfo& operator = (const PropertyInfo&) { return *this; } + const Type& _declarationType; const Type& _ptype; std::string _name; diff --git a/include/osgIntrospection/Value b/include/osgIntrospection/Value index 34183062d..25df2b1d7 100644 --- a/include/osgIntrospection/Value +++ b/include/osgIntrospection/Value @@ -177,9 +177,22 @@ namespace osgIntrospection struct Instance: Instance_base { Instance(T data): _data(data) {} + virtual Instance_base *clone() const { return new Instance(*this); } virtual ~Instance() {} 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 @@ -233,7 +246,7 @@ namespace osgIntrospection _ref_inst = new Instance(vl->_data); _const_ref_inst = new Instance(vl->_data); } - + virtual Instance_box_base *clone() const { Instance_box *new_inbox = new Instance_box(); @@ -261,6 +274,9 @@ namespace osgIntrospection private: bool nullptr_; + + Instance_box& operator = (const Instance_box&) { return *this; } + }; // Generic instance box for pointer values. Unlike Instance_box<>, diff --git a/src/osg/ShapeDrawable.cpp b/src/osg/ShapeDrawable.cpp index 6e040419c..53ac15e76 100644 --- a/src/osg/ShapeDrawable.cpp +++ b/src/osg/ShapeDrawable.cpp @@ -59,6 +59,9 @@ class DrawShapeVisitor : public ConstShapeVisitor const TessellationHints* _hints; protected: + + DrawShapeVisitor& operator = (const DrawShapeVisitor&) { return *this; } + enum SphereHalf { SphereTopHalf, SphereBottomHalf }; // helpers for apply( Cylinder | Sphere | Capsule ) @@ -1055,6 +1058,11 @@ class ComputeBoundShapeVisitor : public ConstShapeVisitor virtual void apply(const CompositeShape&); BoundingBox& _bb; + + protected: + + ComputeBoundShapeVisitor& operator = (const ComputeBoundShapeVisitor&) { return *this; } + }; @@ -1322,6 +1330,9 @@ class PrimitiveShapeVisitor : public ConstShapeVisitor const TessellationHints* _hints; private: + + PrimitiveShapeVisitor& operator = (const PrimitiveShapeVisitor&) { return *this; } + // helpers for apply( Cylinder | Sphere | Capsule ) 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); diff --git a/src/osg/Transform.cpp b/src/osg/Transform.cpp index 99afb5c29..c5040b601 100644 --- a/src/osg/Transform.cpp +++ b/src/osg/Transform.cpp @@ -39,8 +39,6 @@ class TransformVisitor : public NodeVisitor _ignoreCameras(ignoreCameras) {} - META_NodeVisitor("osg","TransformVisitor") - virtual void apply(Transform& transform) { if (_coordMode==LOCAL_TO_WORLD) @@ -85,6 +83,10 @@ class TransformVisitor : public NodeVisitor const_cast(nodePath[i])->accept(*this); } } + + protected: + + TransformVisitor& operator = (const TransformVisitor&) { return *this; } }; diff --git a/src/osgDB/DatabasePager.cpp b/src/osgDB/DatabasePager.cpp index 0e43fb304..761ff64ec 100644 --- a/src/osgDB/DatabasePager.cpp +++ b/src/osgDB/DatabasePager.cpp @@ -257,6 +257,10 @@ public: std::set > _textureSet; std::set > _drawableSet; osg::ref_ptr _kdTreeBuilder; + +protected: + + FindCompileableGLObjectsVisitor& operator = (const FindCompileableGLObjectsVisitor&) { return *this; } }; diff --git a/src/osgSim/SphereSegment.cpp b/src/osgSim/SphereSegment.cpp index 026f17d7d..cdc900dbc 100644 --- a/src/osgSim/SphereSegment.cpp +++ b/src/osgSim/SphereSegment.cpp @@ -920,6 +920,10 @@ struct ActivateTransparencyOnType } const std::type_info& _t; + +protected: + + ActivateTransparencyOnType& operator = (const ActivateTransparencyOnType&) { return *this; } }; struct DeactivateTransparencyOnType @@ -938,6 +942,10 @@ struct DeactivateTransparencyOnType } const std::type_info& _t; + +protected: + + DeactivateTransparencyOnType& operator = (const DeactivateTransparencyOnType&) { return *this; } }; void SphereSegment::setSurfaceColor(const osg::Vec4& c) @@ -1190,6 +1198,10 @@ namespace SphereSegmentIntersector } VertexArray& _vertices; + + protected: + + SortFunctor& operator = (const SortFunctor&) { return *this; } }; @@ -2600,6 +2612,10 @@ namespace SphereSegmentIntersector { return _lowerOutside ? _plane.distance(v) : -_plane.distance(v) ; } + + protected: + + AzimPlaneIntersector& operator = (const AzimPlaneIntersector&) { return *this; } }; struct ElevationIntersector @@ -2737,6 +2753,10 @@ namespace SphereSegmentIntersector return _lowerOutside ? computedElev-_elev : _elev-computedElev ; } + + protected: + + ElevationIntersector& operator = (const ElevationIntersector&) { return *this; } }; @@ -2864,6 +2884,10 @@ namespace SphereSegmentIntersector } + protected: + + RadiusIntersector& operator = (const RadiusIntersector&) { return *this; } + }; } diff --git a/src/osgText/String.cpp b/src/osgText/String.cpp index 9f4ddb92f..1527db18b 100644 --- a/src/osgText/String.cpp +++ b/src/osgText/String.cpp @@ -54,6 +54,10 @@ struct look_ahead_iterator const std::string& _string; unsigned int _index; unsigned char _nullCharacter; + +protected: + + look_ahead_iterator& operator = (const look_ahead_iterator&) { return *this; } }; String::Encoding findEncoding(look_ahead_iterator& charString,String::Encoding overrideEncoding) diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 8ca4611fd..d3df69c7f 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -84,6 +84,8 @@ class PrintVisitor : public NodeVisitor virtual void apply(LOD& node) { apply((Group&)node); } protected: + + PrintVisitor& operator = (const PrintVisitor&) { return *this; } std::ostream& _out; int _indent; diff --git a/src/osgUtil/DelaunayTriangulator.cpp b/src/osgUtil/DelaunayTriangulator.cpp index 1388e576f..c8925e154 100644 --- a/src/osgUtil/DelaunayTriangulator.cpp +++ b/src/osgUtil/DelaunayTriangulator.cpp @@ -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) {} // first endpoint @@ -150,6 +150,13 @@ private: class Triangle { public: + + Triangle(): + a_(0), + b_(0), + c_(0) {} + + Triangle(Vertex_index a, Vertex_index b, Vertex_index c, osg::Vec3Array *points) : a_(a), b_(b), @@ -161,6 +168,21 @@ public: 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 b() const { return b_; } inline Vertex_index c() const { return c_; } @@ -321,6 +343,7 @@ public: private: + 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 diff --git a/src/osgUtil/EdgeCollector.cpp b/src/osgUtil/EdgeCollector.cpp index 72f04c021..a11c9b8a1 100644 --- a/src/osgUtil/EdgeCollector.cpp +++ b/src/osgUtil/EdgeCollector.cpp @@ -428,6 +428,10 @@ class CopyVertexArrayToPointsVisitor : public osg::ArrayVisitor } EdgeCollector::PointList& _pointList; + + protected: + + CopyVertexArrayToPointsVisitor& operator = (const CopyVertexArrayToPointsVisitor&) { return *this; } }; EdgeCollector::~EdgeCollector() diff --git a/src/osgUtil/IntersectVisitor.cpp b/src/osgUtil/IntersectVisitor.cpp index 9799acbaa..077f4c365 100644 --- a/src/osgUtil/IntersectVisitor.cpp +++ b/src/osgUtil/IntersectVisitor.cpp @@ -418,6 +418,11 @@ struct TriangleHit const osg::Vec3* _v2; float _r3; const osg::Vec3* _v3; + +protected: + + TriangleHit& operator = (const TriangleHit&) { return *this; } + }; diff --git a/src/osgUtil/LineSegmentIntersector.cpp b/src/osgUtil/LineSegmentIntersector.cpp index 70124e7a8..3cedd49fb 100644 --- a/src/osgUtil/LineSegmentIntersector.cpp +++ b/src/osgUtil/LineSegmentIntersector.cpp @@ -45,7 +45,11 @@ namespace LineSegmentIntersectorUtils float _r2; const osg::Vec3* _v2; float _r3; - const osg::Vec3* _v3; + const osg::Vec3* _v3; + + protected: + + TriangleIntersection& operator = (const TriangleIntersection&) { return *this; } }; typedef std::multimap TriangleIntersections; diff --git a/src/osgUtil/Simplifier.cpp b/src/osgUtil/Simplifier.cpp index a38764722..ab65e4bfc 100644 --- a/src/osgUtil/Simplifier.cpp +++ b/src/osgUtil/Simplifier.cpp @@ -1348,6 +1348,11 @@ class CopyArrayToPointsVisitor : public osg::ArrayVisitor } EdgeCollapse::PointList& _pointList; + + + protected: + + CopyArrayToPointsVisitor& operator = (const CopyArrayToPointsVisitor&) { return *this; } }; class CopyVertexArrayToPointsVisitor : public osg::ArrayVisitor @@ -1400,6 +1405,11 @@ class CopyVertexArrayToPointsVisitor : public osg::ArrayVisitor } EdgeCollapse::PointList& _pointList; + + protected: + + CopyVertexArrayToPointsVisitor& operator = (const CopyVertexArrayToPointsVisitor&) { return *this; } + }; void EdgeCollapse::setGeometry(osg::Geometry* geometry, const Simplifier::IndexList& protectedPoints) @@ -1567,6 +1577,10 @@ class CopyPointsToArrayVisitor : public osg::ArrayVisitor EdgeCollapse::PointList& _pointList; unsigned int _index; + + protected: + + CopyPointsToArrayVisitor& operator = (CopyPointsToArrayVisitor&) { return *this; } }; class NormalizeArrayVisitor : public osg::ArrayVisitor @@ -1633,6 +1647,10 @@ class CopyPointsToVertexArrayVisitor : public osg::ArrayVisitor } EdgeCollapse::PointList& _pointList; + + protected: + + CopyPointsToVertexArrayVisitor& operator = (CopyPointsToArrayVisitor&) { return *this; } }; diff --git a/src/osgUtil/TriStripVisitor.cpp b/src/osgUtil/TriStripVisitor.cpp index 34e585510..c077c264d 100644 --- a/src/osgUtil/TriStripVisitor.cpp +++ b/src/osgUtil/TriStripVisitor.cpp @@ -46,6 +46,10 @@ class WriteValue : public osg::ConstValueVisitor virtual void apply(const Vec2& v) { _o << v; } virtual void apply(const Vec3& 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 @@ -163,6 +171,10 @@ class RemapArray : public osg::ArrayVisitor virtual void apply(osg::Vec2Array& array) { remap(array); } virtual void apply(osg::Vec3Array& array) { remap(array); } virtual void apply(osg::Vec4Array& array) { remap(array); } + +protected: + + RemapArray& operator = (const RemapArray&) { return *this; } }; struct MyTriangleOperator diff --git a/src/osgUtil/TriStrip_graph_array.h b/src/osgUtil/TriStrip_graph_array.h index 6cdafb8e6..92bd1191e 100644 --- a/src/osgUtil/TriStrip_graph_array.h +++ b/src/osgUtil/TriStrip_graph_array.h @@ -194,6 +194,9 @@ public: // friend void swap(_mytype & Left, _mytype & Right) { Left.swap(Right); } protected: + + graph_array& operator = (const graph_array&) { return *this; } + size_t m_NbArcs; std::vector m_Nodes; }; diff --git a/src/osgViewer/PixelBufferWin32.cpp b/src/osgViewer/PixelBufferWin32.cpp index 8189c0fe0..e323a6086 100644 --- a/src/osgViewer/PixelBufferWin32.cpp +++ b/src/osgViewer/PixelBufferWin32.cpp @@ -189,7 +189,6 @@ class TemporaryWindow: public osg::Referenced { public: TemporaryWindow(); - TemporaryWindow(const TemporaryWindow &); HWND getHandle() const { return _handle; } HDC getDC() const { return _dc; } @@ -199,6 +198,7 @@ public: protected: ~TemporaryWindow(); + TemporaryWindow(const TemporaryWindow &) {} TemporaryWindow &operator=(const TemporaryWindow &) { return *this; } void create(); @@ -221,11 +221,6 @@ TemporaryWindow::TemporaryWindow() create(); } -TemporaryWindow::TemporaryWindow(const TemporaryWindow &) -{ - throw "This is TemporaryWindow, please don't copy me!"; -} - void TemporaryWindow::create() { std::ostringstream oss;