Browse Source

vc7.1 fixes

cxgeorge 23 years ago
parent
commit
0bb4baebe7

+ 2 - 2
panda/src/builder/builderAttribTempl.I

@@ -92,7 +92,7 @@ has_normal() const {
 //               true.
 //               true.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VT, class NT, class TT, class CT>
 template <class VT, class NT, class TT, class CT>
-INLINE BuilderAttribTempl<VT, NT, TT, CT>::NType BuilderAttribTempl<VT, NT, TT, CT>::
+INLINE TYPENAME BuilderAttribTempl<VT, NT, TT, CT>::NType BuilderAttribTempl<VT, NT, TT, CT>::
 get_normal() const {
 get_normal() const {
   nassertr(has_normal(), _normal);
   nassertr(has_normal(), _normal);
   return _normal;
   return _normal;
@@ -145,7 +145,7 @@ has_color() const {
 //               true.
 //               true.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VT, class NT, class TT, class CT>
 template <class VT, class NT, class TT, class CT>
-INLINE BuilderAttribTempl<VT, NT, TT, CT>::CType BuilderAttribTempl<VT, NT, TT, CT>::
+INLINE TYPENAME BuilderAttribTempl<VT, NT, TT, CT>::CType BuilderAttribTempl<VT, NT, TT, CT>::
 get_color() const {
 get_color() const {
   nassertr(has_color(), _color);
   nassertr(has_color(), _color);
   return _color;
   return _color;

+ 6 - 6
panda/src/builder/builderPrimTempl.I

@@ -452,7 +452,7 @@ set_type(BuilderPrimType t) {
 //               one of has_normal() or has_overall_normal() is true.
 //               one of has_normal() or has_overall_normal() is true.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VTX>
 template <class VTX>
-INLINE BuilderPrimTempl<VTX>::NType BuilderPrimTempl<VTX>::
+INLINE TYPENAME BuilderPrimTempl<VTX>::NType BuilderPrimTempl<VTX>::
 get_normal() const {
 get_normal() const {
   return DAttrib::get_normal();
   return DAttrib::get_normal();
 }
 }
@@ -481,7 +481,7 @@ set_normal(const NType &n) {
 //               one of has_color() or has_overall_color() is true.
 //               one of has_color() or has_overall_color() is true.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VTX>
 template <class VTX>
-INLINE BuilderPrimTempl<VTX>::CType BuilderPrimTempl<VTX>::
+INLINE TYPENAME BuilderPrimTempl<VTX>::CType BuilderPrimTempl<VTX>::
 get_color() const {
 get_color() const {
   return DAttrib::get_color();
   return DAttrib::get_color();
 }
 }
@@ -570,7 +570,7 @@ get_num_verts() const {
 //               the primitive.
 //               the primitive.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VTX>
 template <class VTX>
-INLINE BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
+INLINE TYPENAME BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
 get_vertex(int n) {
 get_vertex(int n) {
   nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex));
   nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex));
   return _verts[n];
   return _verts[n];
@@ -583,7 +583,7 @@ get_vertex(int n) {
 //               < get_num_verts().
 //               < get_num_verts().
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VTX>
 template <class VTX>
-INLINE const BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
+INLINE const TYPENAME BuilderPrimTempl<VTX>::Vertex &BuilderPrimTempl<VTX>::
 get_vertex(int n) const {
 get_vertex(int n) const {
   nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex));
   nassertr(n >= 0 && n < (int)_verts.size(), *(new Vertex));
   return _verts[n];
   return _verts[n];
@@ -645,7 +645,7 @@ get_num_components() const {
 //               add_component() and get_num_components().
 //               add_component() and get_num_components().
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VTX>
 template <class VTX>
-INLINE BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
+INLINE TYPENAME BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
 get_component(int n) {
 get_component(int n) {
   nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib));
   nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib));
   return _components[n];
   return _components[n];
@@ -660,7 +660,7 @@ get_component(int n) {
 //               add_component() and get_num_components().
 //               add_component() and get_num_components().
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VTX>
 template <class VTX>
-INLINE const BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
+INLINE const TYPENAME BuilderPrimTempl<VTX>::DAttrib &BuilderPrimTempl<VTX>::
 get_component(int n) const {
 get_component(int n) const {
   nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib));
   nassertr(n >= 0 && n < (int)_components.size(), *(new DAttrib));
   return _components[n];
   return _components[n];

+ 2 - 2
panda/src/builder/builderVertexTempl.I

@@ -113,7 +113,7 @@ has_coord() const {
 //               true.
 //               true.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VT, class NT, class TT, class CT>
 template <class VT, class NT, class TT, class CT>
-INLINE BuilderVertexTempl<VT, NT, TT, CT>::VType BuilderVertexTempl<VT, NT, TT, CT>::
+INLINE TYPENAME BuilderVertexTempl<VT, NT, TT, CT>::VType BuilderVertexTempl<VT, NT, TT, CT>::
 get_coord() const {
 get_coord() const {
   nassertr(has_coord(), _coord);
   nassertr(has_coord(), _coord);
   return _coord;
   return _coord;
@@ -209,7 +209,7 @@ clear_texcoord() {
 //               has_texcoord() is true.
 //               has_texcoord() is true.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class VT, class NT, class TT, class CT>
 template <class VT, class NT, class TT, class CT>
-INLINE BuilderVertexTempl<VT, NT, TT, CT>::TType BuilderVertexTempl<VT, NT, TT, CT>::
+INLINE TYPENAME BuilderVertexTempl<VT, NT, TT, CT>::TType BuilderVertexTempl<VT, NT, TT, CT>::
 get_texcoord() const {
 get_texcoord() const {
   nassertr(has_texcoord(), _texcoord);
   nassertr(has_texcoord(), _texcoord);
   return _texcoord;
   return _texcoord;

+ 2 - 2
panda/src/builder/mesherFanMaker.I

@@ -260,8 +260,8 @@ build(pvector<Prim> &unrolled_tris) {
 
 
 template <class PrimType>
 template <class PrimType>
 int MesherFanMaker<PrimType>::
 int MesherFanMaker<PrimType>::
-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<Prim> &unrolled_tris) {
        pvector<Prim> &unrolled_tris) {
   Edges::iterator ei;
   Edges::iterator ei;
   Strips::iterator si;
   Strips::iterator si;

+ 2 - 2
panda/src/builder/mesherFanMaker.h

@@ -65,8 +65,8 @@ public:
   float compute_angle() const;
   float compute_angle() const;
 
 
   int build(pvector<Prim> &unrolled_tris);
   int build(pvector<Prim> &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<Prim> &unrolled_tris);
              pvector<Prim> &unrolled_tris);
 
 
   ostream &output(ostream &out) const;
   ostream &output(ostream &out) const;

+ 8 - 8
panda/src/builder/mesherStrip.I

@@ -128,7 +128,7 @@ rotate_back() {
 //               pointer equality with any shared Edge.
 //               pointer equality with any shared Edge.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class PrimType>
 template <class PrimType>
-INLINE MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
+INLINE TYPENAME MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
 get_head_edge() const {
 get_head_edge() const {
   Verts::const_iterator vi = _verts.begin();
   Verts::const_iterator vi = _verts.begin();
   return Edge(_verts.front(), *++vi);
   return Edge(_verts.front(), *++vi);
@@ -143,7 +143,7 @@ get_head_edge() const {
 //               pointer equality with any shared Edge.
 //               pointer equality with any shared Edge.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class PrimType>
 template <class PrimType>
-INLINE MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
+INLINE TYPENAME MesherStrip<PrimType>::Edge MesherStrip<PrimType>::
 get_tail_edge() const {
 get_tail_edge() const {
   Verts::const_reverse_iterator vi = _verts.rbegin();
   Verts::const_reverse_iterator vi = _verts.rbegin();
   return Edge(*++vi, _verts.back());
   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);
     _plane_normal = cross(p1-p2, p2-p3);
     float l = length(_plane_normal);
     float l = length(_plane_normal);
 
 
-    if (l != 0.0) {
+    if (l != 0.0f) {
       _plane_normal /= l;
       _plane_normal /= l;
       _planar = true;
       _planar = true;
       _plane_offset = -dot(_plane_normal, p1);
       _plane_offset = -dot(_plane_normal, p1);
@@ -1046,7 +1046,7 @@ show_neighbors(ostream &out) const {
 //               the given edge.
 //               the given edge.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class PrimType>
 template <class PrimType>
-const MesherStrip<PrimType>::Vertex *MesherStrip<PrimType>::
+const TYPENAME MesherStrip<PrimType>::Vertex *MesherStrip<PrimType>::
 find_uncommon_vertex(const Edge *edge) const {
 find_uncommon_vertex(const Edge *edge) const {
   const Vertex *a = edge->_a;
   const Vertex *a = edge->_a;
   const Vertex *b = edge->_b;
   const Vertex *b = edge->_b;
@@ -1073,7 +1073,7 @@ find_uncommon_vertex(const Edge *edge) const {
 //               opposite the given vertex.
 //               opposite the given vertex.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class PrimType>
 template <class PrimType>
-const MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
+const TYPENAME MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
 find_opposite_edge(const Vertex *vertex) const {
 find_opposite_edge(const Vertex *vertex) const {
   Edges::const_iterator ei;
   Edges::const_iterator ei;
   for (ei = _edges.begin(); ei != _edges.end(); ++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.
 //               edge opposite the given edge.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class PrimType>
 template <class PrimType>
-const MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
+const TYPENAME MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
 find_opposite_edge(const Edge *edge) const {
 find_opposite_edge(const Edge *edge) const {
   const Vertex *a = edge->_a;
   const Vertex *a = edge->_a;
   const Vertex *b = edge->_b;
   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.
 //               one of two edges adjacent to the given edge.
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template <class PrimType>
 template <class PrimType>
-const MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
+const TYPENAME MesherStrip<PrimType>::Edge *MesherStrip<PrimType>::
 find_adjacent_edge(const Edge *edge) const {
 find_adjacent_edge(const Edge *edge) const {
   const Vertex *a = edge->_a;
   const Vertex *a = edge->_a;
   const Vertex *b = edge->_b;
   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 a_diff = dot(_plane_normal, a_strip._plane_normal);
     float b_diff = dot(_plane_normal, b_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;
       return a_diff > b_diff;
     }
     }
   }
   }

+ 1 - 1
panda/src/builder/mesherTempl.I

@@ -384,7 +384,7 @@ count_vert_edges(const EdgePtrs &edges) const {
 }
 }
 
 
 template <class PrimType>
 template <class PrimType>
-plist<MesherTempl<PrimType>::Strip> &MesherTempl<PrimType>::
+plist<TYPENAME MesherTempl<PrimType>::Strip> &MesherTempl<PrimType>::
 choose_strip_list(const Strip &strip) {
 choose_strip_list(const Strip &strip) {
   switch (strip._status) {
   switch (strip._status) {
   case MS_done:
   case MS_done:

+ 1 - 1
panda/src/builder/mesherTempl.h

@@ -78,7 +78,7 @@ protected:
   Edges _edges;
   Edges _edges;
   int _stripIndex;
   int _stripIndex;
   BuilderBucket *_bucket;
   BuilderBucket *_bucket;
-  Strips::iterator _next_strip;
+  TYPENAME Strips::iterator _next_strip;
   Colors _colors;
   Colors _colors;
   ColorSheetMap _color_sheets;
   ColorSheetMap _color_sheets;
 
 

+ 1 - 1
panda/src/chan/animChannel.I

@@ -68,7 +68,7 @@ AnimChannel(AnimGroup *parent, const string &name)
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 template<class SwitchType>
 template<class SwitchType>
 void AnimChannel<SwitchType>::
 void AnimChannel<SwitchType>::
-get_value(int, AnimChannel<SwitchType>::ValueType &) {
+get_value(int, TYPENAME AnimChannel<SwitchType>::ValueType &) {
 }
 }
 #endif
 #endif