From 291c2790af2f7c2b9cd7a2453b8211a7ab3f1abf Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 22 May 2009 07:54:42 +0000 Subject: [PATCH] Removed harmless warnings --- .../trimesh/create/mc_trivial_walker.h | 2 +- vcg/complex/trimesh/update/curvature.h | 46 +++++++++---------- vcg/complex/trimesh/update/selection.h | 1 - vcg/simplex/face/base.h | 2 +- 4 files changed, 25 insertions(+), 26 deletions(-) diff --git a/vcg/complex/trimesh/create/mc_trivial_walker.h b/vcg/complex/trimesh/create/mc_trivial_walker.h index f1657605..d2916a08 100644 --- a/vcg/complex/trimesh/create/mc_trivial_walker.h +++ b/vcg/complex/trimesh/create/mc_trivial_walker.h @@ -246,7 +246,7 @@ private: return; } } - assert(pos >=0 && pos< _mesh->vert.size()); + assert(pos >=0 && size_t(pos)< _mesh->vert.size()); v = &_mesh->vert[pos]; } void GetYIntercept(const vcg::Point3i &p1, const vcg::Point3i &p2, VertexPointer &v) diff --git a/vcg/complex/trimesh/update/curvature.h b/vcg/complex/trimesh/update/curvature.h index 09577654..5cb294ca 100644 --- a/vcg/complex/trimesh/update/curvature.h +++ b/vcg/complex/trimesh/update/curvature.h @@ -50,7 +50,7 @@ Revision 1.1 2005/02/22 16:40:29 ganovelli created. This version writes the gaussian curvature on the Q() member of the vertex -/****************************************************************************/ +****************************************************************************/ #ifndef VCGLIB_UPDATE_CURVATURE_ #define VCGLIB_UPDATE_CURVATURE_ @@ -401,7 +401,7 @@ public: static void MeanAndGaussian(MeshType & m) { assert(HasFFAdjacency(m)); - float area0, area1, area2, angle0, angle1, angle2, e01, e12, e20; + float area0, area1, area2, angle0, angle1, angle2; FaceIterator fi; VertexIterator vi; typename MeshType::CoordType e01v ,e12v ,e20v; @@ -442,27 +442,27 @@ public: } else // obtuse - { - if(angle0 >= M_PI/2) - { - (TDAreaPtr)[(*fi).V(0)].A += vcg::DoubleArea((*fi)) / 4.0; - (TDAreaPtr)[(*fi).V(1)].A += vcg::DoubleArea((*fi)) / 8.0; - (TDAreaPtr)[(*fi).V(2)].A += vcg::DoubleArea((*fi)) / 8.0; - } - else if(angle1 >= M_PI/2) - { - (TDAreaPtr)[(*fi).V(0)].A += vcg::DoubleArea((*fi)) / 8.0; - (TDAreaPtr)[(*fi).V(1)].A += vcg::DoubleArea((*fi)) / 4.0; - (TDAreaPtr)[(*fi).V(2)].A += vcg::DoubleArea((*fi)) / 8.0; - } - else - { - (TDAreaPtr)[(*fi).V(0)].A += vcg::DoubleArea((*fi)) / 8.0; - (TDAreaPtr)[(*fi).V(1)].A += vcg::DoubleArea((*fi)) / 8.0; - (TDAreaPtr)[(*fi).V(2)].A += vcg::DoubleArea((*fi)) / 4.0; - } - } - } + { + if(angle0 >= M_PI/2) + { + (TDAreaPtr)[(*fi).V(0)].A += vcg::DoubleArea((*fi)) / 4.0; + (TDAreaPtr)[(*fi).V(1)].A += vcg::DoubleArea((*fi)) / 8.0; + (TDAreaPtr)[(*fi).V(2)].A += vcg::DoubleArea((*fi)) / 8.0; + } + else if(angle1 >= M_PI/2) + { + (TDAreaPtr)[(*fi).V(0)].A += vcg::DoubleArea((*fi)) / 8.0; + (TDAreaPtr)[(*fi).V(1)].A += vcg::DoubleArea((*fi)) / 4.0; + (TDAreaPtr)[(*fi).V(2)].A += vcg::DoubleArea((*fi)) / 8.0; + } + else + { + (TDAreaPtr)[(*fi).V(0)].A += vcg::DoubleArea((*fi)) / 8.0; + (TDAreaPtr)[(*fi).V(1)].A += vcg::DoubleArea((*fi)) / 8.0; + (TDAreaPtr)[(*fi).V(2)].A += vcg::DoubleArea((*fi)) / 4.0; + } + } + } for(fi=m.face.begin();fi!=m.face.end();++fi) if( !(*fi).IsD() ) diff --git a/vcg/complex/trimesh/update/selection.h b/vcg/complex/trimesh/update/selection.h index 41533cc8..07fe4ad7 100644 --- a/vcg/complex/trimesh/update/selection.h +++ b/vcg/complex/trimesh/update/selection.h @@ -174,7 +174,6 @@ static size_t VertexFromFaceLoose(MeshType &m) */ static size_t VertexFromFaceStrict(MeshType &m) { - size_t selCnt=0; VertexFromFaceLoose(m); FaceIterator fi; for(fi = m.face.begin(); fi != m.face.end(); ++fi) diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index 6367e823..1329fad3 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -103,7 +103,7 @@ class FaceTypeHolder{ typedef BFT *FacePointer; typedef BTT *TetraPointer; template - void ImportLocal(const LeftF & l){} + void ImportLocal(const LeftF & ){} static void Name(std::vector & name){}