From 0bb4baebe7dd481c578cfc2347f187a5a1d2ebc1 Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Sat, 23 Nov 2002 02:18:47 +0000 Subject: [PATCH] vc7.1 fixes --- panda/src/builder/builderAttribTempl.I | 4 ++-- panda/src/builder/builderPrimTempl.I | 12 ++++++------ panda/src/builder/builderVertexTempl.I | 4 ++-- panda/src/builder/mesherFanMaker.I | 4 ++-- panda/src/builder/mesherFanMaker.h | 4 ++-- panda/src/builder/mesherStrip.I | 16 ++++++++-------- panda/src/builder/mesherTempl.I | 2 +- panda/src/builder/mesherTempl.h | 2 +- panda/src/chan/animChannel.I | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/panda/src/builder/builderAttribTempl.I b/panda/src/builder/builderAttribTempl.I index ffd6c8b6e4..e7f703b813 100644 --- a/panda/src/builder/builderAttribTempl.I +++ b/panda/src/builder/builderAttribTempl.I @@ -92,7 +92,7 @@ has_normal() const { // true. //////////////////////////////////////////////////////////////////// template -INLINE BuilderAttribTempl::NType BuilderAttribTempl:: +INLINE TYPENAME BuilderAttribTempl::NType BuilderAttribTempl:: get_normal() const { nassertr(has_normal(), _normal); return _normal; @@ -145,7 +145,7 @@ has_color() const { // true. //////////////////////////////////////////////////////////////////// template -INLINE BuilderAttribTempl::CType BuilderAttribTempl:: +INLINE TYPENAME BuilderAttribTempl::CType BuilderAttribTempl:: get_color() const { nassertr(has_color(), _color); return _color; diff --git a/panda/src/builder/builderPrimTempl.I b/panda/src/builder/builderPrimTempl.I index 6905cb6c3b..317b53d16e 100644 --- a/panda/src/builder/builderPrimTempl.I +++ b/panda/src/builder/builderPrimTempl.I @@ -452,7 +452,7 @@ set_type(BuilderPrimType t) { // one of has_normal() or has_overall_normal() is true. //////////////////////////////////////////////////////////////////// template -INLINE BuilderPrimTempl::NType BuilderPrimTempl:: +INLINE TYPENAME BuilderPrimTempl::NType BuilderPrimTempl:: get_normal() const { return DAttrib::get_normal(); } @@ -481,7 +481,7 @@ set_normal(const NType &n) { // one of has_color() or has_overall_color() is true. //////////////////////////////////////////////////////////////////// template -INLINE BuilderPrimTempl::CType BuilderPrimTempl:: +INLINE TYPENAME BuilderPrimTempl::CType BuilderPrimTempl:: get_color() const { return DAttrib::get_color(); } @@ -570,7 +570,7 @@ get_num_verts() const { // the primitive. //////////////////////////////////////////////////////////////////// template -INLINE BuilderPrimTempl::Vertex &BuilderPrimTempl:: +INLINE TYPENAME BuilderPrimTempl::Vertex &BuilderPrimTempl:: get_vertex(int n) { nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex)); return _verts[n]; @@ -583,7 +583,7 @@ get_vertex(int n) { // < get_num_verts(). //////////////////////////////////////////////////////////////////// template -INLINE const BuilderPrimTempl::Vertex &BuilderPrimTempl:: +INLINE const TYPENAME BuilderPrimTempl::Vertex &BuilderPrimTempl:: get_vertex(int n) const { nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex)); return _verts[n]; @@ -645,7 +645,7 @@ get_num_components() const { // add_component() and get_num_components(). //////////////////////////////////////////////////////////////////// template -INLINE BuilderPrimTempl::DAttrib &BuilderPrimTempl:: +INLINE TYPENAME BuilderPrimTempl::DAttrib &BuilderPrimTempl:: get_component(int n) { nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib)); return _components[n]; @@ -660,7 +660,7 @@ get_component(int n) { // add_component() and get_num_components(). //////////////////////////////////////////////////////////////////// template -INLINE const BuilderPrimTempl::DAttrib &BuilderPrimTempl:: +INLINE const TYPENAME BuilderPrimTempl::DAttrib &BuilderPrimTempl:: get_component(int n) const { nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib)); return _components[n]; diff --git a/panda/src/builder/builderVertexTempl.I b/panda/src/builder/builderVertexTempl.I index 11a9256d11..76443c9cf6 100644 --- a/panda/src/builder/builderVertexTempl.I +++ b/panda/src/builder/builderVertexTempl.I @@ -113,7 +113,7 @@ has_coord() const { // true. //////////////////////////////////////////////////////////////////// template -INLINE BuilderVertexTempl::VType BuilderVertexTempl:: +INLINE TYPENAME BuilderVertexTempl::VType BuilderVertexTempl:: get_coord() const { nassertr(has_coord(), _coord); return _coord; @@ -209,7 +209,7 @@ clear_texcoord() { // has_texcoord() is true. //////////////////////////////////////////////////////////////////// template -INLINE BuilderVertexTempl::TType BuilderVertexTempl:: +INLINE TYPENAME BuilderVertexTempl::TType BuilderVertexTempl:: get_texcoord() const { nassertr(has_texcoord(), _texcoord); return _texcoord; diff --git a/panda/src/builder/mesherFanMaker.I b/panda/src/builder/mesherFanMaker.I index 344371dd28..901a0c25eb 100644 --- a/panda/src/builder/mesherFanMaker.I +++ b/panda/src/builder/mesherFanMaker.I @@ -260,8 +260,8 @@ build(pvector &unrolled_tris) { template int MesherFanMaker:: -unroll(Strips::iterator strip_begin, Strips::iterator strip_end, - Edges::iterator edge_begin, Edges::iterator edge_end, +unroll(TYPENAME Strips::iterator strip_begin, TYPENAME Strips::iterator strip_end, + TYPENAME Edges::iterator edge_begin, TYPENAME Edges::iterator edge_end, pvector &unrolled_tris) { Edges::iterator ei; Strips::iterator si; diff --git a/panda/src/builder/mesherFanMaker.h b/panda/src/builder/mesherFanMaker.h index 76a6f307e2..bd01f4894c 100644 --- a/panda/src/builder/mesherFanMaker.h +++ b/panda/src/builder/mesherFanMaker.h @@ -65,8 +65,8 @@ public: float compute_angle() const; int build(pvector &unrolled_tris); - int unroll(Strips::iterator strip_begin, Strips::iterator strip_end, - Edges::iterator edge_begin, Edges::iterator edge_end, + int unroll(TYPENAME Strips::iterator strip_begin, TYPENAME Strips::iterator strip_end, + TYPENAME Edges::iterator edge_begin, TYPENAME Edges::iterator edge_end, pvector &unrolled_tris); ostream &output(ostream &out) const; diff --git a/panda/src/builder/mesherStrip.I b/panda/src/builder/mesherStrip.I index 2d019d7ccc..e5d9926e06 100644 --- a/panda/src/builder/mesherStrip.I +++ b/panda/src/builder/mesherStrip.I @@ -128,7 +128,7 @@ rotate_back() { // pointer equality with any shared Edge. //////////////////////////////////////////////////////////////////// template -INLINE MesherStrip::Edge MesherStrip:: +INLINE TYPENAME MesherStrip::Edge MesherStrip:: get_head_edge() const { Verts::const_iterator vi = _verts.begin(); return Edge(_verts.front(), *++vi); @@ -143,7 +143,7 @@ get_head_edge() const { // pointer equality with any shared Edge. //////////////////////////////////////////////////////////////////// template -INLINE MesherStrip::Edge MesherStrip:: +INLINE TYPENAME MesherStrip::Edge MesherStrip:: get_tail_edge() const { Verts::const_reverse_iterator vi = _verts.rbegin(); return Edge(*++vi, _verts.back()); @@ -220,7 +220,7 @@ MesherStrip(const PrimType &prim, int index, const BuilderBucket &bucket) { _plane_normal = cross(p1-p2, p2-p3); float l = length(_plane_normal); - if (l != 0.0) { + if (l != 0.0f) { _plane_normal /= l; _planar = true; _plane_offset = -dot(_plane_normal, p1); @@ -1046,7 +1046,7 @@ show_neighbors(ostream &out) const { // the given edge. //////////////////////////////////////////////////////////////////// template -const MesherStrip::Vertex *MesherStrip:: +const TYPENAME MesherStrip::Vertex *MesherStrip:: find_uncommon_vertex(const Edge *edge) const { const Vertex *a = edge->_a; const Vertex *b = edge->_b; @@ -1073,7 +1073,7 @@ find_uncommon_vertex(const Edge *edge) const { // opposite the given vertex. //////////////////////////////////////////////////////////////////// template -const MesherStrip::Edge *MesherStrip:: +const TYPENAME MesherStrip::Edge *MesherStrip:: find_opposite_edge(const Vertex *vertex) const { Edges::const_iterator ei; for (ei = _edges.begin(); ei != _edges.end(); ++ei) { @@ -1094,7 +1094,7 @@ find_opposite_edge(const Vertex *vertex) const { // edge opposite the given edge. //////////////////////////////////////////////////////////////////// template -const MesherStrip::Edge *MesherStrip:: +const TYPENAME MesherStrip::Edge *MesherStrip:: find_opposite_edge(const Edge *edge) const { const Vertex *a = edge->_a; const Vertex *b = edge->_b; @@ -1118,7 +1118,7 @@ find_opposite_edge(const Edge *edge) const { // one of two edges adjacent to the given edge. //////////////////////////////////////////////////////////////////// template -const MesherStrip::Edge *MesherStrip:: +const TYPENAME MesherStrip::Edge *MesherStrip:: find_adjacent_edge(const Edge *edge) const { const Vertex *a = edge->_a; const Vertex *b = edge->_b; @@ -1560,7 +1560,7 @@ pick_sheet_mate(const MesherStrip &a_strip, const MesherStrip &b_strip) const { float a_diff = dot(_plane_normal, a_strip._plane_normal); float b_diff = dot(_plane_normal, b_strip._plane_normal); - if (fabs(a_diff - b_diff) > 0.0001) { + if (fabs(a_diff - b_diff) > 0.0001f) { return a_diff > b_diff; } } diff --git a/panda/src/builder/mesherTempl.I b/panda/src/builder/mesherTempl.I index d4072e36ea..465f022a0a 100644 --- a/panda/src/builder/mesherTempl.I +++ b/panda/src/builder/mesherTempl.I @@ -384,7 +384,7 @@ count_vert_edges(const EdgePtrs &edges) const { } template -plist::Strip> &MesherTempl:: +plist::Strip> &MesherTempl:: choose_strip_list(const Strip &strip) { switch (strip._status) { case MS_done: diff --git a/panda/src/builder/mesherTempl.h b/panda/src/builder/mesherTempl.h index ebc5292014..d098111b2b 100644 --- a/panda/src/builder/mesherTempl.h +++ b/panda/src/builder/mesherTempl.h @@ -78,7 +78,7 @@ protected: Edges _edges; int _stripIndex; BuilderBucket *_bucket; - Strips::iterator _next_strip; + TYPENAME Strips::iterator _next_strip; Colors _colors; ColorSheetMap _color_sheets; diff --git a/panda/src/chan/animChannel.I b/panda/src/chan/animChannel.I index bdba833a4f..f95da14508 100644 --- a/panda/src/chan/animChannel.I +++ b/panda/src/chan/animChannel.I @@ -68,7 +68,7 @@ AnimChannel(AnimGroup *parent, const string &name) //////////////////////////////////////////////////////////////////// template void AnimChannel:: -get_value(int, AnimChannel::ValueType &) { +get_value(int, TYPENAME AnimChannel::ValueType &) { } #endif