Removed unused typenames (with latest generation of compilers it become a warning as unused variables)

This commit is contained in:
Paolo Cignoni 2015-09-24 16:41:34 +00:00
parent 5e40d7a734
commit 874346d211
8 changed files with 290 additions and 330 deletions

View File

@ -1693,7 +1693,6 @@ public:
typedef vcg::SpatialHashTable<VertexType, ScalarType> SampleSHT; typedef vcg::SpatialHashTable<VertexType, ScalarType> SampleSHT;
SampleSHT sht; SampleSHT sht;
tri::VertTmark<MeshType> markerFunctor; tri::VertTmark<MeshType> markerFunctor;
typedef vcg::vertex::PointDistanceFunctor<ScalarType> VDistFunct;
std::vector<VertexType*> closests; std::vector<VertexType*> closests;
int mergedCnt=0; int mergedCnt=0;
sht.Set(m.vert.begin(), m.vert.end()); sht.Set(m.vert.begin(), m.vert.end());

View File

@ -100,7 +100,6 @@ namespace vcg {
typename GRID::CoordType & _ip) typename GRID::CoordType & _ip)
{ {
typedef typename GRID::ScalarType ScalarType; typedef typename GRID::ScalarType ScalarType;
typedef Point3<ScalarType> Point3x;
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf(&mesh); MarkerFace mf(&mesh);
@ -129,7 +128,6 @@ namespace vcg {
typename GRID::CoordType &_closestPt) typename GRID::CoordType &_closestPt)
{ {
typedef typename GRID::ScalarType ScalarType; typedef typename GRID::ScalarType ScalarType;
typedef Point3<ScalarType> Point3x;
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);
@ -163,7 +161,6 @@ namespace vcg {
typename GRID::CoordType &_closestPt) typename GRID::CoordType &_closestPt)
{ {
typedef typename GRID::ScalarType ScalarType; typedef typename GRID::ScalarType ScalarType;
typedef Point3<ScalarType> Point3x;
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);
@ -177,7 +174,6 @@ namespace vcg {
const typename GRID::ScalarType & _maxDist,typename GRID::ScalarType & _minDist, const typename GRID::ScalarType & _maxDist,typename GRID::ScalarType & _minDist,
typename GRID::CoordType &_closestPt) typename GRID::CoordType &_closestPt)
{ {
typedef typename GRID::ScalarType ScalarType;
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);
@ -341,8 +337,6 @@ namespace vcg {
typename GRID::ObjPtr DoRay(MESH & mesh,GRID & gr, const Ray3<typename GRID::ScalarType> & _ray, typename GRID::ObjPtr DoRay(MESH & mesh,GRID & gr, const Ray3<typename GRID::ScalarType> & _ray,
const typename GRID::ScalarType & _maxDist, typename GRID::ScalarType & _t) const typename GRID::ScalarType & _maxDist, typename GRID::ScalarType & _t)
{ {
typedef typename MESH::FaceType FaceType;
typedef typename MESH::ScalarType ScalarType;
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);
@ -501,7 +495,6 @@ namespace vcg {
typename GRID::CoordType &_closestPt) typename GRID::CoordType &_closestPt)
{ {
typedef typename GRID::ScalarType ScalarType; typedef typename GRID::ScalarType ScalarType;
typedef Point3<ScalarType> Point3x;
typedef FaceTmark<MESH> MarkerFace; typedef FaceTmark<MESH> MarkerFace;
MarkerFace mf; MarkerFace mf;
mf.SetMesh(&mesh); mf.SetMesh(&mesh);

View File

@ -50,7 +50,6 @@ namespace tri {
template <class TetraMeshType> template <class TetraMeshType>
void Tetrahedron(TetraMeshType &in) void Tetrahedron(TetraMeshType &in)
{ {
typedef TetraMeshType MeshType;
typedef typename TetraMeshType::CoordType CoordType; typedef typename TetraMeshType::CoordType CoordType;
typedef typename TetraMeshType::VertexPointer VertexPointer; typedef typename TetraMeshType::VertexPointer VertexPointer;
typedef typename TetraMeshType::VertexIterator VertexIterator; typedef typename TetraMeshType::VertexIterator VertexIterator;
@ -278,7 +277,6 @@ void Icosahedron(IcoMeshType &in)
template <class MeshType> template <class MeshType>
void Hexahedron(MeshType &in) void Hexahedron(MeshType &in)
{ {
typedef typename MeshType::ScalarType ScalarType;
typedef typename MeshType::CoordType CoordType; typedef typename MeshType::CoordType CoordType;
typedef typename MeshType::VertexPointer VertexPointer; typedef typename MeshType::VertexPointer VertexPointer;
typedef typename MeshType::VertexIterator VertexIterator; typedef typename MeshType::VertexIterator VertexIterator;
@ -327,7 +325,6 @@ void Hexahedron(MeshType &in)
template <class MeshType> template <class MeshType>
void Square(MeshType &in) void Square(MeshType &in)
{ {
typedef typename MeshType::ScalarType ScalarType;
typedef typename MeshType::CoordType CoordType; typedef typename MeshType::CoordType CoordType;
typedef typename MeshType::VertexPointer VertexPointer; typedef typename MeshType::VertexPointer VertexPointer;
typedef typename MeshType::VertexIterator VertexIterator; typedef typename MeshType::VertexIterator VertexIterator;
@ -405,9 +402,7 @@ void SphericalCap(MeshType &in, float angleRad, const int subdiv = 3 )
template <class MeshType> template <class MeshType>
void Sphere(MeshType &in, const int subdiv = 3 ) void Sphere(MeshType &in, const int subdiv = 3 )
{ {
typedef typename MeshType::ScalarType ScalarType;
typedef typename MeshType::CoordType CoordType; typedef typename MeshType::CoordType CoordType;
typedef typename MeshType::VertexPointer VertexPointer;
typedef typename MeshType::VertexIterator VertexIterator; typedef typename MeshType::VertexIterator VertexIterator;
typedef typename MeshType::FaceIterator FaceIterator; typedef typename MeshType::FaceIterator FaceIterator;
if(in.vn==0 && in.fn==0) Icosahedron(in); if(in.vn==0 && in.fn==0) Icosahedron(in);
@ -445,7 +440,6 @@ void Cone( MeshType& in,
const typename MeshType::ScalarType h, const typename MeshType::ScalarType h,
const int SubDiv = 36 ) const int SubDiv = 36 )
{ {
typedef typename MeshType::ScalarType ScalarType;
typedef typename MeshType::CoordType CoordType; typedef typename MeshType::CoordType CoordType;
typedef typename MeshType::VertexPointer VertexPointer; typedef typename MeshType::VertexPointer VertexPointer;
typedef typename MeshType::VertexIterator VertexIterator; typedef typename MeshType::VertexIterator VertexIterator;
@ -534,7 +528,6 @@ void Cone( MeshType& in,
template <class MeshType > template <class MeshType >
void Box(MeshType &in, const typename MeshType::BoxType & bb ) void Box(MeshType &in, const typename MeshType::BoxType & bb )
{ {
typedef typename MeshType::ScalarType ScalarType;
typedef typename MeshType::CoordType CoordType; typedef typename MeshType::CoordType CoordType;
typedef typename MeshType::VertexPointer VertexPointer; typedef typename MeshType::VertexPointer VertexPointer;
typedef typename MeshType::VertexIterator VertexIterator; typedef typename MeshType::VertexIterator VertexIterator;
@ -613,11 +606,9 @@ void Torus(MeshType &m, float hRingRadius, float vRingRadius, int hRingDiv=24, i
template <class MeshType,class V, class F > template <class MeshType,class V, class F >
void Build( MeshType & in, const V & v, const F & f) void Build( MeshType & in, const V & v, const F & f)
{ {
typedef typename MeshType::ScalarType ScalarType;
typedef typename MeshType::CoordType CoordType; typedef typename MeshType::CoordType CoordType;
typedef typename MeshType::VertexPointer VertexPointer; typedef typename MeshType::VertexPointer VertexPointer;
typedef typename MeshType::VertexIterator VertexIterator; typedef typename MeshType::VertexIterator VertexIterator;
typedef typename MeshType::FaceIterator FaceIterator;
in.Clear(); in.Clear();
Allocator<MeshType>::AddVertices(in,v.size()); Allocator<MeshType>::AddVertices(in,v.size());
@ -698,9 +689,6 @@ template <class MeshType>
void Grid(MeshType & in, int w, int h, float wl, float hl, float *data=0) void Grid(MeshType & in, int w, int h, float wl, float hl, float *data=0)
{ {
typedef typename MeshType::CoordType CoordType; typedef typename MeshType::CoordType CoordType;
typedef typename MeshType::VertexPointer VertexPointer;
typedef typename MeshType::VertexIterator VertexIterator;
typedef typename MeshType::FaceIterator FaceIterator;
in.Clear(); in.Clear();
Allocator<MeshType>::AddVertices(in,w*h); Allocator<MeshType>::AddVertices(in,w*h);

View File

@ -59,7 +59,6 @@ inline bool IsEdgeBorder(EdgeType const & e, const int j )
template <class EdgeType> template <class EdgeType>
void VVStarVE(typename EdgeType::VertexType* vp, std::vector<typename EdgeType::VertexType *> &starVec) void VVStarVE(typename EdgeType::VertexType* vp, std::vector<typename EdgeType::VertexType *> &starVec)
{ {
typedef typename EdgeType::VertexType* VertexPointer;
starVec.clear(); starVec.clear();
edge::VEIterator<EdgeType> vei(vp); edge::VEIterator<EdgeType> vei(vp);
while(!vei.End()) while(!vei.End())

View File

@ -555,7 +555,6 @@ bool CheckFlipEdgeNormal(FaceType &f, const int z, const float angleRad)
{ {
typedef typename FaceType::VertexType VertexType; typedef typename FaceType::VertexType VertexType;
typedef typename VertexType::CoordType CoordType; typedef typename VertexType::CoordType CoordType;
typedef typename VertexType::ScalarType ScalarType;
VertexType *OldDiag0 = f.V0(z); VertexType *OldDiag0 = f.V0(z);
VertexType *OldDiag1 = f.V1(z); VertexType *OldDiag1 = f.V1(z);
@ -817,7 +816,6 @@ void VFStarVF( typename FaceType::VertexType* vp,
std::vector<FaceType *> &faceVec, std::vector<FaceType *> &faceVec,
std::vector<int> &indexes) std::vector<int> &indexes)
{ {
typedef typename FaceType::VertexType* VertexPointer;
faceVec.clear(); faceVec.clear();
indexes.clear(); indexes.clear();
face::VFIterator<FaceType> vfi(vp); face::VFIterator<FaceType> vfi(vp);

View File

@ -101,7 +101,6 @@ namespace vcg{
typename SPATIAL_INDEX:: CoordType &_closestPt) typename SPATIAL_INDEX:: CoordType &_closestPt)
{ {
typedef typename SPATIAL_INDEX::ObjPtr ObjPtr; typedef typename SPATIAL_INDEX::ObjPtr ObjPtr;
typedef SPATIAL_INDEX SpatialIndex;
typedef typename SPATIAL_INDEX::CoordType CoordType; typedef typename SPATIAL_INDEX::CoordType CoordType;
typedef typename SPATIAL_INDEX::ScalarType ScalarType; typedef typename SPATIAL_INDEX::ScalarType ScalarType;
typedef typename SPATIAL_INDEX::Box3x Box3x; typedef typename SPATIAL_INDEX::Box3x Box3x;

View File

@ -141,7 +141,6 @@ namespace vcg {
{ {
typedef SCALAR_TYPE ScalarType; typedef SCALAR_TYPE ScalarType;
typedef typename vcg::Point3< ScalarType > Point3t; typedef typename vcg::Point3< ScalarType > Point3t;
typedef TRIANGLETYPE Triangle3t;
bool penetration_detected = false; bool penetration_detected = false;

View File

@ -100,10 +100,6 @@ template<class PolygonType>
void PolyNormals(const PolygonType &F, void PolyNormals(const PolygonType &F,
std::vector<typename PolygonType::CoordType> &Norms) std::vector<typename PolygonType::CoordType> &Norms)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType;
Norms.clear(); Norms.clear();
if (F.VN()<=2) return; if (F.VN()<=2) return;
for (int i=0;i<F.VN();i++) for (int i=0;i<F.VN();i++)
@ -126,7 +122,6 @@ typename PolygonType::CoordType PolyBarycenter(const PolygonType &F)
template<class PolygonType> template<class PolygonType>
typename PolygonType::ScalarType PolyArea(const PolygonType &F) typename PolygonType::ScalarType PolyArea(const PolygonType &F)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
@ -159,8 +154,6 @@ typename PolygonType::CoordType PolygonNormal(const PolygonType &F)
template<class PolygonType> template<class PolygonType>
typename PolygonType::ScalarType PolyPerimeter(const PolygonType &F) typename PolygonType::ScalarType PolyPerimeter(const PolygonType &F)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
ScalarType SumL=0; ScalarType SumL=0;
@ -177,11 +170,10 @@ typename PolygonType::ScalarType PolyPerimeter(const PolygonType &F)
template<class PolygonType> template<class PolygonType>
typename PolygonType::ScalarType PolyNormDeviation(const PolygonType &F) typename PolygonType::ScalarType PolyNormDeviation(const PolygonType &F)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
std::vector<typename PolygonType::CoordType> Norms; std::vector<CoordType> Norms;
PolyNormals(F,Norms); PolyNormals(F,Norms);
//calculate the Avg Normal //calculate the Avg Normal
@ -209,7 +201,6 @@ void PolyAngleDeviation(const PolygonType &F,
typename PolygonType::ScalarType &AvgDev, typename PolygonType::ScalarType &AvgDev,
typename PolygonType::ScalarType &MaxDev) typename PolygonType::ScalarType &MaxDev)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
assert(F.VN()>2); assert(F.VN()>2);
@ -246,7 +237,6 @@ void PolyAngleDeviation(const PolygonType &F,
template<class PolygonType> template<class PolygonType>
vcg::Plane3<typename PolygonType::ScalarType> PolyFittingPlane(const PolygonType &F) vcg::Plane3<typename PolygonType::ScalarType> PolyFittingPlane(const PolygonType &F)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
vcg::Plane3<ScalarType> BestPL; vcg::Plane3<ScalarType> BestPL;
@ -263,7 +253,6 @@ vcg::Plane3<typename PolygonType::ScalarType> PolyFittingPlane(const PolygonType
template<class PolygonType> template<class PolygonType>
typename PolygonType::ScalarType PolyFlatness(const PolygonType &F) typename PolygonType::ScalarType PolyFlatness(const PolygonType &F)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
@ -293,7 +282,6 @@ template<class PolygonType>
void PolyPCA(const PolygonType &F, void PolyPCA(const PolygonType &F,
typename PolygonType::CoordType PCA[]) typename PolygonType::CoordType PCA[])
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
@ -361,7 +349,6 @@ template<class PolygonType>
void PolyScaledPCA(const PolygonType &F, void PolyScaledPCA(const PolygonType &F,
typename PolygonType::CoordType PCA[]) typename PolygonType::CoordType PCA[])
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
@ -415,7 +402,6 @@ void GetPolyTemplatePos(const PolygonType &F,
std::vector<typename PolygonType::CoordType> &TemplatePos, std::vector<typename PolygonType::CoordType> &TemplatePos,
bool force_isotropy=false) bool force_isotropy=false)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
std::vector<CoordType> UniformPos,UniformTempl; std::vector<CoordType> UniformPos,UniformTempl;
@ -528,7 +514,6 @@ template<class PolygonType>
typename PolygonType::ScalarType PolyAspectRatio(const PolygonType &F, typename PolygonType::ScalarType PolyAspectRatio(const PolygonType &F,
bool isotropic=false) bool isotropic=false)
{ {
typedef typename PolygonType::FaceType FaceType;
typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::CoordType CoordType;
typedef typename PolygonType::ScalarType ScalarType; typedef typename PolygonType::ScalarType ScalarType;
std::vector<CoordType> TemplatePos; std::vector<CoordType> TemplatePos;