diff --git a/panda/src/chan/vector_PartGroupStar.h b/panda/src/chan/vector_PartGroupStar.h index e93cdc1207..863f19794a 100644 --- a/panda/src/chan/vector_PartGroupStar.h +++ b/panda/src/chan/vector_PartGroupStar.h @@ -22,6 +22,10 @@ // vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_PARTGROUPSTAR std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PARTGROUPSTAR) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_PartGroupStar; diff --git a/panda/src/collide/collisionNode.cxx b/panda/src/collide/collisionNode.cxx index 2c1a93544b..ab177864ff 100644 --- a/panda/src/collide/collisionNode.cxx +++ b/panda/src/collide/collisionNode.cxx @@ -161,8 +161,10 @@ recompute_bound() { child_volumes.push_back(&(*gi)->get_bound()); } + const BoundingVolume **child_begin = &child_volumes[0]; + const BoundingVolume **child_end = child_begin + child_volumes.size(); bool success = - _bound->around(child_volumes.begin(), child_volumes.end()); + _bound->around(child_begin, child_end); #ifndef NDEBUG if (!success) { diff --git a/panda/src/collide/collisionPolygon.cxx b/panda/src/collide/collisionPolygon.cxx index d64f278452..a50c234480 100644 --- a/panda/src/collide/collisionPolygon.cxx +++ b/panda/src/collide/collisionPolygon.cxx @@ -151,7 +151,10 @@ xform(const LMatrix4f &mat) { if (_reversed) { reverse(verts.begin(), verts.end()); } - setup_points(verts.begin(), verts.end()); + + const LPoint3f *verts_begin = &verts[0]; + const LPoint3f *verts_end = verts_begin + verts.size(); + setup_points(verts_begin, verts_end); } clear_viz_arcs(); @@ -202,7 +205,9 @@ recompute_bound() { vertices.push_back(to_3d(*pi)); } - gbv->around(vertices.begin(), vertices.end()); + const LPoint3f *vertices_begin = &vertices[0]; + const LPoint3f *vertices_end = vertices_begin + vertices.size(); + gbv->around(vertices_begin, vertices_end); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/display/graphicsWindowInputDevice.I b/panda/src/display/graphicsWindowInputDevice.I index f60d465726..5d34671917 100644 --- a/panda/src/display/graphicsWindowInputDevice.I +++ b/panda/src/display/graphicsWindowInputDevice.I @@ -3,6 +3,16 @@ // //////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////// +// Function: GraphicsWindowInputDevice::Default Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE GraphicsWindowInputDevice:: +GraphicsWindowInputDevice() { + _flags = 0; +} + //////////////////////////////////////////////////////////////////// // Function: GraphicsWindowInputDevice::get_name // Access: Public diff --git a/panda/src/display/graphicsWindowInputDevice.h b/panda/src/display/graphicsWindowInputDevice.h index 01d6f5d6e8..efc37d4dd6 100644 --- a/panda/src/display/graphicsWindowInputDevice.h +++ b/panda/src/display/graphicsWindowInputDevice.h @@ -31,6 +31,7 @@ public: static GraphicsWindowInputDevice keyboard_only(const string &name); static GraphicsWindowInputDevice pointer_and_keyboard(const string &name); + INLINE GraphicsWindowInputDevice(); GraphicsWindowInputDevice(const GraphicsWindowInputDevice ©); void operator = (const GraphicsWindowInputDevice ©); ~GraphicsWindowInputDevice(); @@ -75,6 +76,10 @@ private: #include "graphicsWindowInputDevice.I" +#ifdef HAVE_DINKUM +#define VV_GRAPHICSWINDOWINPUTDEVICE std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_GRAPHICSWINDOWINPUTDEVICE) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_GraphicsWindowInputDevice; diff --git a/panda/src/egg/vector_PT_EggMaterial.h b/panda/src/egg/vector_PT_EggMaterial.h index db78a15aed..49c711eaf8 100644 --- a/panda/src/egg/vector_PT_EggMaterial.h +++ b/panda/src/egg/vector_PT_EggMaterial.h @@ -22,6 +22,10 @@ // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_PT_EGGMATERIAL std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGMATERIAL) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) typedef vector vector_PT_EggMaterial; diff --git a/panda/src/egg/vector_PT_EggTexture.h b/panda/src/egg/vector_PT_EggTexture.h index b5399ce8d8..1df7f97ae7 100644 --- a/panda/src/egg/vector_PT_EggTexture.h +++ b/panda/src/egg/vector_PT_EggTexture.h @@ -22,6 +22,10 @@ // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_PT_EGGTEXTURE std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGTEXTURE) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) typedef vector vector_PT_EggTexture; diff --git a/panda/src/egg/vector_PT_EggVertex.h b/panda/src/egg/vector_PT_EggVertex.h index 75c93318e1..f63ab53217 100644 --- a/panda/src/egg/vector_PT_EggVertex.h +++ b/panda/src/egg/vector_PT_EggVertex.h @@ -22,6 +22,10 @@ // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_PT_EGGVERTEX std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, VV_PT_EGGVERTEX) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEGG, EXPTP_PANDAEGG, std::vector) typedef vector vector_PT_EggVertex; diff --git a/panda/src/glgsg/glGraphicsStateGuardian.cxx b/panda/src/glgsg/glGraphicsStateGuardian.cxx index 56ce3f9d9f..14f8f6017c 100644 --- a/panda/src/glgsg/glGraphicsStateGuardian.cxx +++ b/panda/src/glgsg/glGraphicsStateGuardian.cxx @@ -250,6 +250,7 @@ reset() { _point_smooth_enabled = false; _scissor_enabled = false; _lighting_enabled = false; + _lighting_enabled_this_frame = false; _normals_enabled = false; _texturing_enabled = false; _multisample_alpha_one_enabled = false; diff --git a/panda/src/gobj/LOD.I b/panda/src/gobj/LOD.I index 816e0230ec..ba2df20653 100644 --- a/panda/src/gobj/LOD.I +++ b/panda/src/gobj/LOD.I @@ -5,6 +5,15 @@ #include +//////////////////////////////////////////////////////////////////// +// Function: LODSwitch::Default Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE LODSwitch:: +LODSwitch() { +} + //////////////////////////////////////////////////////////////////// // Function: LODSwitch::Constructor // Access: Public @@ -15,6 +24,29 @@ LODSwitch(float in, float out) { set_range(in, out); } +//////////////////////////////////////////////////////////////////// +// Function: LODSwitch::Copy Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE LODSwitch:: +LODSwitch(const LODSwitch ©) : + _in(copy._in), + _out(copy._out) +{ +} + +//////////////////////////////////////////////////////////////////// +// Function: LODSwitch::Copy Assignment Operator +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void LODSwitch:: +operator = (const LODSwitch ©) { + _in = copy._in; + _out = copy._out; +} + //////////////////////////////////////////////////////////////////// // Function: LODSwitch::get_range // Access: Public diff --git a/panda/src/gobj/LOD.h b/panda/src/gobj/LOD.h index e22d393054..bd74d447d3 100644 --- a/panda/src/gobj/LOD.h +++ b/panda/src/gobj/LOD.h @@ -31,7 +31,11 @@ class DatagramIterator; //////////////////////////////////////////////////////////////////// class EXPCL_PANDA LODSwitch { public: + INLINE LODSwitch(); INLINE LODSwitch(float in, float out); + INLINE LODSwitch(const LODSwitch ©); + INLINE void operator = (const LODSwitch ©); + INLINE void get_range(float &in, float &out) const; INLINE float get_in() const; INLINE float get_out() const; @@ -54,6 +58,10 @@ protected: float _out; }; +#ifdef HAVE_DINKUM +#define VV_LODSWITCH std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LODSWITCH) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector LODSwitchVector; diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index a5d5fa1a59..790840c8b6 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -469,7 +469,10 @@ recompute_bound() { } } - gbv->around(vertices.begin(), vertices.end()); + const LPoint3f *vertices_begin = &vertices[0]; + const LPoint3f *vertices_end = vertices_begin + vertices.size(); + + gbv->around(vertices_begin, vertices_end); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/graph/arcChain.I b/panda/src/graph/arcChain.I index 3ead326372..3c4f3760c4 100644 --- a/panda/src/graph/arcChain.I +++ b/panda/src/graph/arcChain.I @@ -15,8 +15,8 @@ ArcComponent(Node *node) : _next(NULL) { MemoryUsage::update_type(this, get_class_type()); - nassertv(node != (Node *)NULL); _p._node = node; + nassertv(node != (Node *)NULL); _p._node->ref(); } @@ -33,9 +33,9 @@ ArcComponent(NodeRelation *arc, ArcComponent *next) : _next(next) { MemoryUsage::update_type(this, get_class_type()); + _p._arc = arc; nassertv(_next != (ArcComponent *)NULL); nassertv(arc != (NodeRelation *)NULL); - _p._arc = arc; _p._arc->ref(); _p._arc->ref_parent(); } @@ -52,10 +52,12 @@ ArcComponent(const ArcComponent ©) : MemoryUsage::update_type(this, get_class_type()); if (has_arc()) { _p._arc = copy._p._arc; + nassertv(_p._arc != (NodeRelation *)NULL); _p._arc->ref(); _p._arc->ref_parent(); } else { _p._node = copy._p._node; + nassertv(_p._node != (Node *)NULL); _p._node->ref(); } } @@ -69,9 +71,11 @@ ArcComponent(const ArcComponent ©) : INLINE_GRAPH ArcChain::ArcComponent:: ~ArcComponent() { if (has_arc()) { + nassertv(_p._arc != (NodeRelation *)NULL); _p._arc->unref_parent(); unref_delete(_p._arc); } else { + nassertv(_p._node != (Node *)NULL); unref_delete(_p._node); } } @@ -251,10 +255,15 @@ ArcChain() { // This chain may now be extended by repeatedly calling // push_back() with each arc below that node in // sequence. +// +// If the Node pointer is NULL, this quietly creates an +// empty ArcChain. //////////////////////////////////////////////////////////////////// INLINE_GRAPH ArcChain:: ArcChain(Node *top_node) { - _head = new ArcComponent(top_node); + if (top_node != (Node *)NULL) { + _head = new ArcComponent(top_node); + } } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/graph/nodeRelation.cxx b/panda/src/graph/nodeRelation.cxx index d005f1f29d..3a54fc0189 100644 --- a/panda/src/graph/nodeRelation.cxx +++ b/panda/src/graph/nodeRelation.cxx @@ -825,8 +825,11 @@ recompute_bound() { child_volumes.push_back(&(*drpi)->get_bound()); } + const BoundingVolume **child_begin = &child_volumes[0]; + const BoundingVolume **child_end = child_begin + child_volumes.size(); bool success = - _bound->around(child_volumes.begin(), child_volumes.end()); + _bound->around(child_begin, child_end); + #ifndef NDEBUG if (!success) { diff --git a/panda/src/graph/vector_NodeRelation_star.h b/panda/src/graph/vector_NodeRelation_star.h index 4a1950dca8..696dc90000 100644 --- a/panda/src/graph/vector_NodeRelation_star.h +++ b/panda/src/graph/vector_NodeRelation_star.h @@ -21,6 +21,10 @@ class NodeRelation; // file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_NODERELATION_STAR std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NODERELATION_STAR) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_NodeRelation_star; diff --git a/panda/src/graph/vector_PT_Node.h b/panda/src/graph/vector_PT_Node.h index 9a3846003c..d2af0c2309 100644 --- a/panda/src/graph/vector_PT_Node.h +++ b/panda/src/graph/vector_PT_Node.h @@ -22,6 +22,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_PT_NODE std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODE) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_PT_Node; diff --git a/panda/src/graph/vector_PT_NodeRelation.h b/panda/src/graph/vector_PT_NodeRelation.h index 83e9a4390d..1fd3b03c97 100644 --- a/panda/src/graph/vector_PT_NodeRelation.h +++ b/panda/src/graph/vector_PT_NodeRelation.h @@ -22,6 +22,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_PT_NODERELATION std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_NODERELATION) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_PT_NodeRelation; diff --git a/panda/src/light/vector_PT_Light.h b/panda/src/light/vector_PT_Light.h index d87a6c89af..c62c73cfdb 100644 --- a/panda/src/light/vector_PT_Light.h +++ b/panda/src/light/vector_PT_Light.h @@ -21,6 +21,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_PT_LIGHT std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_PT_LIGHT) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_PT_Light; diff --git a/panda/src/linmath/Sources.pp b/panda/src/linmath/Sources.pp index d2b49f22c8..22a8ab9c81 100644 --- a/panda/src/linmath/Sources.pp +++ b/panda/src/linmath/Sources.pp @@ -33,8 +33,8 @@ pta_TexCoordf.cxx pta_TexCoordf.h pta_Vertexf.cxx pta_Vertexf.h \ vector_Colorf.cxx vector_Colorf.h vector_LPoint2f.cxx \ vector_LPoint2f.h vector_LVecBase3f.cxx vector_LVecBase3f.h \ - vector_Normalf.cxx vector_Normalf.h vector_Vertexf.cxx \ - vector_Vertexf.h + vector_Normalf.cxx vector_Normalf.h vector_TexCoordf.h \ + vector_Vertexf.cxx vector_Vertexf.h #define INSTALL_HEADERS \ cmath.I cmath.h compose_matrix.h compose_matrix_src.I \ diff --git a/panda/src/linmath/vector_Colorf.h b/panda/src/linmath/vector_Colorf.h index 753483c87b..3d73be0c99 100644 --- a/panda/src/linmath/vector_Colorf.h +++ b/panda/src/linmath/vector_Colorf.h @@ -21,6 +21,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_COLORF std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_COLORF) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_Colorf; diff --git a/panda/src/linmath/vector_LPoint2f.h b/panda/src/linmath/vector_LPoint2f.h index 2be164f9c9..031a45a145 100644 --- a/panda/src/linmath/vector_LPoint2f.h +++ b/panda/src/linmath/vector_LPoint2f.h @@ -21,6 +21,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_LPOINT2F std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LPOINT2F) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_LPoint2f; diff --git a/panda/src/linmath/vector_LVecBase3f.h b/panda/src/linmath/vector_LVecBase3f.h index 5d152529f7..8169df0abd 100644 --- a/panda/src/linmath/vector_LVecBase3f.h +++ b/panda/src/linmath/vector_LVecBase3f.h @@ -21,6 +21,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_LVECBASE3F std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_LVECBASE3F) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_LVecBase3f; diff --git a/panda/src/linmath/vector_Normalf.h b/panda/src/linmath/vector_Normalf.h index 22c1577615..fd3739ec04 100644 --- a/panda/src/linmath/vector_Normalf.h +++ b/panda/src/linmath/vector_Normalf.h @@ -21,6 +21,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_NORMALF std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_NORMALF) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_Normalf; diff --git a/panda/src/linmath/vector_Vertexf.h b/panda/src/linmath/vector_Vertexf.h index a043f6c30e..9b79dbd12c 100644 --- a/panda/src/linmath/vector_Vertexf.h +++ b/panda/src/linmath/vector_Vertexf.h @@ -21,6 +21,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_VERTEXF std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_VERTEXF) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_Vertexf; diff --git a/panda/src/putil/pointerToArray.I b/panda/src/putil/pointerToArray.I index db1a1791cc..533b995aae 100644 --- a/panda/src/putil/pointerToArray.I +++ b/panda/src/putil/pointerToArray.I @@ -211,20 +211,6 @@ back() const { return _ptr->back(); } -//////////////////////////////////////////////////////////////////// -// Function: PointerToArray::insert -// Access: Public -// Description: -//////////////////////////////////////////////////////////////////// -template -INLINE PointerToArray::iterator PointerToArray:: -insert(iterator position) const { - nassertr(_ptr != NULL, position); - nassertr(position >= _ptr->begin() && - position <= _ptr->end(), position); - return _ptr->insert(position); -} - //////////////////////////////////////////////////////////////////// // Function: PointerToArray::insert // Access: Public diff --git a/panda/src/putil/pointerToArray.h b/panda/src/putil/pointerToArray.h index 3ee76071b3..b5a72cbc18 100644 --- a/panda/src/putil/pointerToArray.h +++ b/panda/src/putil/pointerToArray.h @@ -115,7 +115,6 @@ public: INLINE size_type capacity() const; INLINE reference front() const; INLINE reference back() const; - INLINE iterator insert(iterator position) const; INLINE iterator insert(iterator position, const Element &x) const; INLINE void insert(iterator position, size_type n, const Element &x) const; diff --git a/panda/src/putil/string_utils.cxx b/panda/src/putil/string_utils.cxx index ccf98f6fac..2a392956d5 100644 --- a/panda/src/putil/string_utils.cxx +++ b/panda/src/putil/string_utils.cxx @@ -253,6 +253,6 @@ string_to_double(const string &str, double &result) { bool string_to_float(const string &str, float &result) { string tail; - result = string_to_double(str, tail); + result = (float)string_to_double(str, tail); return tail.empty(); } diff --git a/panda/src/putil/vector_double.h b/panda/src/putil/vector_double.h index 06f9e69900..9f4c9ecb9d 100644 --- a/panda/src/putil/vector_double.h +++ b/panda/src/putil/vector_double.h @@ -19,6 +19,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_DOUBLE std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_DOUBLE) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_double; diff --git a/panda/src/putil/vector_float.h b/panda/src/putil/vector_float.h index 8aadb5dba4..f5a2173429 100644 --- a/panda/src/putil/vector_float.h +++ b/panda/src/putil/vector_float.h @@ -19,6 +19,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_FLOAT std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_FLOAT) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_float; diff --git a/panda/src/putil/vector_typedWritable.h b/panda/src/putil/vector_typedWritable.h index f42b974fb3..95891c7fba 100644 --- a/panda/src/putil/vector_typedWritable.h +++ b/panda/src/putil/vector_typedWritable.h @@ -14,13 +14,17 @@ class TypedWritable; //////////////////////////////////////////////////////////////////// // Class : vector_typedWritable -// Description : A vector of TypedWritable. This class is defined once here, -// and exported to PANDA.DLL; other packages that want -// to use a vector of this type (whether they need to -// export it or not) should include this header file, -// rather than defining the vector again. +// Description : A vector of TypedWritable *. This class is defined +// once here, and exported to PANDA.DLL; other packages +// that want to use a vector of this type (whether they +// need to export it or not) should include this header +// file, rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_TYPEDWRITABLE std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_TYPEDWRITABLE) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_typedWritable; diff --git a/panda/src/putil/vector_uchar.h b/panda/src/putil/vector_uchar.h index 2f6525c4fd..416049aedc 100644 --- a/panda/src/putil/vector_uchar.h +++ b/panda/src/putil/vector_uchar.h @@ -19,6 +19,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_UCHAR std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_UCHAR) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_uchar; diff --git a/panda/src/putil/vector_ulong.h b/panda/src/putil/vector_ulong.h index 4af5750a28..da9315cd11 100644 --- a/panda/src/putil/vector_ulong.h +++ b/panda/src/putil/vector_ulong.h @@ -19,6 +19,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_ULONG std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_ULONG) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_ulong; diff --git a/panda/src/putil/vector_ushort.h b/panda/src/putil/vector_ushort.h index 7b98c5e80c..0b8baf22b0 100644 --- a/panda/src/putil/vector_ushort.h +++ b/panda/src/putil/vector_ushort.h @@ -19,6 +19,10 @@ // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_USHORT std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_USHORT) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_ushort; diff --git a/panda/src/putil/vector_writable.h b/panda/src/putil/vector_writable.h index 7444235e0c..e870324768 100644 --- a/panda/src/putil/vector_writable.h +++ b/panda/src/putil/vector_writable.h @@ -14,13 +14,17 @@ class Writable; //////////////////////////////////////////////////////////////////// // Class : vector_writable -// Description : A vector of TypedWritable. This class is defined once here, +// Description : A vector of Writable *. This class is defined once here, // and exported to PANDA.DLL; other packages that want // to use a vector of this type (whether they need to // export it or not) should include this header file, // rather than defining the vector again. //////////////////////////////////////////////////////////////////// +#ifdef HAVE_DINKUM +#define VV_WRITABLE std::_Vector_val > +EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, VV_WRITABLE) +#endif EXPORT_TEMPLATE_CLASS(EXPCL_PANDA, EXPTP_PANDA, std::vector) typedef vector vector_writable; diff --git a/panda/src/sgmanip/nodePath.I b/panda/src/sgmanip/nodePath.I index 08e6b72b5f..3d464a6049 100644 --- a/panda/src/sgmanip/nodePath.I +++ b/panda/src/sgmanip/nodePath.I @@ -23,6 +23,9 @@ NodePath(TypeHandle graph_type) : NodePathBase(graph_type) { // top node. It's not yet much of a path, but it does // reference at least the one node and can be used as an // ordinary node pointer. +// +// If the Node pointer is NULL, this quietly creates an +// empty NodePath. //////////////////////////////////////////////////////////////////// INLINE NodePath:: NodePath(Node *top_node, TypeHandle graph_type) : NodePathBase(top_node, graph_type) { diff --git a/panda/src/sgraph/geomNode.cxx b/panda/src/sgraph/geomNode.cxx index 7f53bf80fe..fba2bf9f8d 100644 --- a/panda/src/sgraph/geomNode.cxx +++ b/panda/src/sgraph/geomNode.cxx @@ -210,7 +210,9 @@ add_geom(dDrawable *geom) { //////////////////////////////////////////////////////////////////// void GeomNode:: add_geoms_from(const GeomNode *other) { - _geoms.insert(_geoms.end(), other->_geoms.begin(), other->_geoms.end()); + const PT(dDrawable) *geoms_begin = &other->_geoms[0]; + const PT(dDrawable) *geoms_end = geoms_begin + other->_geoms.size(); + _geoms.insert(_geoms.end(), geoms_begin, geoms_end); mark_bound_stale(); } @@ -234,7 +236,9 @@ recompute_bound() { child_volumes.push_back(&(*gi)->get_bound()); } - _bound->around(child_volumes.begin(), child_volumes.end()); + const BoundingVolume **child_begin = &child_volumes[0]; + const BoundingVolume **child_end = child_begin + child_volumes.size(); + _bound->around(child_begin, child_end); } ////////////////////////////////////////////////////////////////////