From 88926f2af793270fe68c4e97a3050f12a139dffd Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 12 May 2004 14:43:36 +0000 Subject: [PATCH] removed warning of unused variables --- apps/metro/min_dist_point.h | 3 +-- apps/metro/sampling.h | 2 +- vcg/simplex/face/base.h | 14 +++++++++----- wrap/io_trimesh/export_ply.h | 4 +++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/apps/metro/min_dist_point.h b/apps/metro/min_dist_point.h index b0e5bbdd..321b49e6 100644 --- a/apps/metro/min_dist_point.h +++ b/apps/metro/min_dist_point.h @@ -140,8 +140,7 @@ void MinDistPoint( MESH & mesh, const Point3 & p, GRID & gr, SCALAR & md /*normf = (1-(alfa+beta))*(bestf->V(0)->Normal())+ (alfa*(bestf->V(1)->Normal()))+ (beta*(bestf->V(2)->Normal()));*/ - bool ret=bestf->InterpolationParameters(q, alfa, beta, gamma); - //assert(ret); + bestf->InterpolationParameters(q, alfa, beta, gamma); normf = (bestf->V(0)->cN())*alfa+ (bestf->V(1)->cN())*beta+ (bestf->V(2)->cN())*gamma; diff --git a/apps/metro/sampling.h b/apps/metro/sampling.h index 0bedacf5..3e7e7a1c 100644 --- a/apps/metro/sampling.h +++ b/apps/metro/sampling.h @@ -356,7 +356,7 @@ template void Sampling::MontecarloFaceSampling() { // Montecarlo sampling. - int cnt = 0; +// int cnt = 0; double n_samples_decimal = 0.0; FaceIterator fi; diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index bca16c10..9229504e 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.11 2004/05/12 12:50:20 turini +include color4 + Revision 1.10 2004/05/10 14:01:09 ganovelli assert(i*0) for using "i" and preventing the compiler warning for unreferenced variable @@ -358,8 +361,8 @@ public: #ifdef __VCGLIB_FACE_WT return _wt[i]; #else - assert(i*0); - return *(TCTYPE*)(&_flags); + assert(0); + return *(TCTYPE*)(&_flags +i) ; #endif } @@ -417,8 +420,8 @@ public: #ifdef __VCGLIB_FACE_WC return _wc[i]; #else - assert(i*0); - return *(Color4b*)(&_flags); + assert(0); + return *(Color4b*)(&_flags + i); #endif } @@ -492,8 +495,9 @@ public: return fs[j]; #else assert(0); - static FFTYPE *dum=0; + static FFTYPE *dum=0; dum+=j; return dum; + #endif } diff --git a/wrap/io_trimesh/export_ply.h b/wrap/io_trimesh/export_ply.h index b7570285..4e0cbd9a 100644 --- a/wrap/io_trimesh/export_ply.h +++ b/wrap/io_trimesh/export_ply.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.4 2004/05/12 10:19:30 ganovelli +new line added at the end of file + Revision 1.3 2004/03/18 15:30:46 cignoni Removed float/double warning @@ -405,7 +408,6 @@ static bool Save(SaveMeshType &m, const char * filename, bool binary, PlyInfo & assert(j==m.vn); char c = 3; - char k = 9; unsigned char b9 = 9; unsigned char b6 = 6; FacePointer fp;