From 6c3c940e34327322507c703889f9f1cfa73ab183 Mon Sep 17 00:00:00 2001 From: "T.Alderighi" Date: Thu, 7 Jun 2018 11:52:44 +0200 Subject: [PATCH] compiler error in appveyor --- vcg/simplex/tetrahedron/component.h | 4 +-- vcg/simplex/tetrahedron/pos.h | 44 ++++++++++++++--------------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/vcg/simplex/tetrahedron/component.h b/vcg/simplex/tetrahedron/component.h index c8e834a9..d9739658 100644 --- a/vcg/simplex/tetrahedron/component.h +++ b/vcg/simplex/tetrahedron/component.h @@ -47,7 +47,7 @@ public: //Empty vertexref inline typename T::VertexType * & V( const int ) { assert(0); static typename T::VertexType *vp=0; return vp; } inline typename T::VertexType * const & V( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; } - inline typename T::VertexType * const cV( const int ) const { assert(0); static typename T::VertexType *vp=0; return vp; } + inline typename T::VertexType * const cV( const int ) { assert(0); static typename T::VertexType *vp=0; return vp; } inline typename T::CoordType & P( const int ) { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } inline const typename T::CoordType & P( const int ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } inline const typename T::CoordType &cP( const int ) const { assert(0); static typename T::CoordType coord(0, 0, 0); return coord; } @@ -178,7 +178,7 @@ public: typedef typename T::VertexType::ScalarType ScalarType; inline typename T::VertexType * & V( const int j ) { assert(j>=0 && j<4); return v[j]; } - inline typename T::VertexType * const cV( const int j ) const { assert(j>=0 && j<4); return v[j]; } + inline typename T::VertexType * const cV( const int j ) { assert(j>=0 && j<4); return v[j]; } inline size_t cFtoVi (const int f, const int j) const { assert(f >= 0 && f < 4); assert(j >= 0 && j < 3); return findices[f][j]; } diff --git a/vcg/simplex/tetrahedron/pos.h b/vcg/simplex/tetrahedron/pos.h index e469879b..4a610828 100644 --- a/vcg/simplex/tetrahedron/pos.h +++ b/vcg/simplex/tetrahedron/pos.h @@ -36,29 +36,6 @@ namespace tetra { /** \addtogroup tetra */ /*@{*/ - -template -void VVStarVT( typename TetraType::VertexPointer vp, std::vector & starVec) -{ - typedef typename TetraType::VertexPointer VertexPointer; - - starVec.clear(); - - tetra::VTIterator vti(vp->VTp(), vp->VTi()); - - while (!vti.End()) - { - starVec.push_back(vti.Vt()->V1(vti.Vi())); - starVec.push_back(vti.Vt()->V2(vti.Vi())); - starVec.push_back(vti.Vt()->V3(vti.Vi())); - ++vti; - } - - std::sort(starVec.begin(), starVec.end()); - typename std::vector::iterator new_end = std::unique(starVec.begin(),starVec.end()); - starVec.resize(new_end - starVec.begin()); -} - /** Class VTIterator. This is a vertex - tetrahedron iterator @param MTTYPE (Template Parameter) Specifies the type of the tetrahedron. @@ -119,6 +96,27 @@ public: }; +template +void VVStarVT( typename TetraType::VertexPointer vp, std::vector & starVec) +{ + typedef typename TetraType::VertexPointer VertexPointer; + + starVec.clear(); + + VTIterator vti(vp->VTp(), vp->VTi()); + + while (!vti.End()) + { + starVec.push_back(vti.Vt()->V1(vti.Vi())); + starVec.push_back(vti.Vt()->V2(vti.Vi())); + starVec.push_back(vti.Vt()->V3(vti.Vi())); + ++vti; + } + + std::sort(starVec.begin(), starVec.end()); + typename std::vector::iterator new_end = std::unique(starVec.begin(),starVec.end()); + starVec.resize(new_end - starVec.begin()); +} /** Templated over the class tetrahedron, it stores a \em position over a tetrahedron in a mesh. It contain a pointer to the current tetrahedron,