Many small changes to remove useless annoying warnings.

This commit is contained in:
Paolo Cignoni 2014-02-13 15:52:17 +00:00
parent 15bec03c89
commit 6efdd91ecc
6 changed files with 674 additions and 687 deletions

View File

@ -230,7 +230,8 @@ static ScalarType EdgeLenghtVariationIfVertexRotated(const FaceType &f, int w0)
pi = pf->cFFi( pi ); pi = pf->cFFi( pi );
pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) ); pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) );
pf = t; pf = t;
assert(guard++<100); guard++;
assert(guard<100);
} while (pf != &f); } while (pf != &f);
assert (na == n); assert (na == n);
return (after-before); return (after-before);
@ -251,8 +252,6 @@ static ScalarType QuadQualityVariationIfVertexRotated(const FaceType &f, int w0)
// rotate arond vertex // rotate arond vertex
const FaceType* pf = &f; const FaceType* pf = &f;
int pi = w0; int pi = w0;
int nb = 0; // vertex valency
int na = 0;
std::vector<const VertexType *> s; // 1 star around v std::vector<const VertexType *> s; // 1 star around v
do { do {
// ScalarType triEdge = (pf->P0(pi) - pf->P1(pi) ).Norm(); // ScalarType triEdge = (pf->P0(pi) - pf->P1(pi) ).Norm();
@ -272,7 +271,8 @@ static ScalarType QuadQualityVariationIfVertexRotated(const FaceType &f, int w0)
pi = pf->cFFi( pi ); pi = pf->cFFi( pi );
pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) ); pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) );
pf = t; pf = t;
assert(guard++<100); guard++;
assert(guard<100);
} while (pf != &f); } while (pf != &f);
assert(s.size()%2==0); assert(s.size()%2==0);
@ -285,7 +285,6 @@ static ScalarType QuadQualityVariationIfVertexRotated(const FaceType &f, int w0)
after+=quadQuality( s[h]->P(),s[i]->P(),s[j]->P(),f.P(w0) ); after+=quadQuality( s[h]->P(),s[i]->P(),s[j]->P(),f.P(w0) );
} }
assert (na == nb);
return (after-before); return (after-before);
} }
@ -595,7 +594,8 @@ static bool IsDoubletFF(const FaceType& f, int wedge){
pi = pf->cFFi( pi ); pi = pf->cFFi( pi );
pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) ); pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) );
pf = t; pf = t;
assert(guard++<100); guard++;
assert(guard<100);
} while (pf != &f); } while (pf != &f);
return (res == 2); return (res == 2);
} }
@ -631,7 +631,8 @@ static bool IsSingletFF(const FaceType& f, int wedge){
pi = pf->cFFi( pi ); pi = pf->cFFi( pi );
pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) ); pi = (pi+1)%3; // FaceType::Next( pf->FFi( pi ) );
pf = t; pf = t;
assert(guard++<100); guard++;
assert(guard<100);
} while (pf != &f); } while (pf != &f);
return (res == 1); return (res == 1);
} }

View File

@ -460,9 +460,7 @@ static void TestVertexFace(MeshType &m)
assert((VFi.F()->V(VFi.I()))==&(*vi)); assert((VFi.F()->V(VFi.I()))==&(*vi));
++VFi; ++VFi;
} }
int num1=numVertex[&(*vi)]; assert(num==numVertex[&(*vi)]);
assert(num==num1);
/*assert(num>1);*/
} }
} }
} }

View File

@ -239,8 +239,9 @@ void FFDetach(FaceType & f, const int e)
{ {
assert(FFCorrectness<FaceType>(f,e)); assert(FFCorrectness<FaceType>(f,e));
assert(!IsBorder<FaceType>(f,e)); // Never try to detach a border edge! assert(!IsBorder<FaceType>(f,e)); // Never try to detach a border edge!
int complexity; int complexity=ComplexSize(f,e);
assert(complexity=ComplexSize(f,e)); (void) complexity;
assert(complexity>0);
Pos< FaceType > FirstFace(&f,e); // Build the half edge Pos< FaceType > FirstFace(&f,e); // Build the half edge
Pos< FaceType > LastFace(&f,e); // Build the half edge Pos< FaceType > LastFace(&f,e); // Build the half edge
@ -343,6 +344,7 @@ void FFSetBorder(FaceType * &f1, int z1)
template <class FaceType> template <class FaceType>
void AssertAdj(FaceType & f) void AssertAdj(FaceType & f)
{ {
(void)f;
assert(f.FFp(0)->FFp(f.FFi(0))==&f); assert(f.FFp(0)->FFp(f.FFi(0))==&f);
assert(f.FFp(1)->FFp(f.FFi(1))==&f); assert(f.FFp(1)->FFp(f.FFi(1))==&f);
assert(f.FFp(2)->FFp(f.FFi(2))==&f); assert(f.FFp(2)->FFp(f.FFi(2))==&f);
@ -435,11 +437,10 @@ void SwapEdge(FaceType &f, const int z)
* Basic link conditions * Basic link conditions
* *
*/ */
template <class MeshType> template <class FaceType>
bool FFLinkCondition(typename MeshType::FaceType &f, const int z) bool FFLinkCondition(FaceType &f, const int z)
{ {
typedef typename MeshType::FaceType FaceType; typedef typename FaceType::VertexType VertexType;
typedef typename MeshType::VertexType VertexType;
typedef typename vcg::face::Pos< FaceType > PosType; typedef typename vcg::face::Pos< FaceType > PosType;
VertexType *v0=f.V0(z); VertexType *v0=f.V0(z);

View File

@ -574,7 +574,6 @@ void GetUV( Point3<P3ScalarType> &n,Point3<P3ScalarType> &u, Point3<P3ScalarType
u.Normalize(); u.Normalize();
v=n^u; v=n^u;
v.Normalize(); v.Normalize();
Point3<P3ScalarType> uv=u^v;
} }

View File

@ -19,17 +19,6 @@
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
* for more details. * * for more details. *
* * * *
****************************************************************************/
/****************************************************************************
History
$Log: not supported by cvs2svn $
Revision 1.1 2007/02/14 01:20:37 ganovelli
working draft of VCG Mesh Image importer and exporter. Does not consider optional attributes. The mesh atributes are only vn and fn (no bbox, texture coordiantes)
****************************************************************************/ ****************************************************************************/
#ifndef __VCGLIB_EXPORT_VMI #ifndef __VCGLIB_EXPORT_VMI
@ -49,10 +38,6 @@
*/ */
#include <vcg/complex/complex.h> #include <vcg/complex/complex.h>
//#include <vcg/simplex/face/component.h>
//#include <vcg/simplex/face/component_ocf.h>
//#include <vcg/simplex/vertex/component.h>
//#include <vcg/simplex/vertex/component_ocf.h>
namespace vcg { namespace vcg {
namespace tri { namespace tri {
@ -61,8 +46,6 @@ namespace io {
template <int N> struct PlaceHolderType{ char A[N];}; template <int N> struct PlaceHolderType{ char A[N];};
template <class SaveMeshType> template <class SaveMeshType>
class ExporterVMI class ExporterVMI
{ {
@ -83,6 +66,8 @@ namespace io {
case 1: return fwrite_mem(src, size,count); break; case 1: return fwrite_mem(src, size,count); break;
case 2: return fwrite(src, size,count, F() ); break; case 2: return fwrite(src, size,count, F() ); break;
} }
assert(0);
return 0;
} }

View File

@ -128,6 +128,7 @@ namespace io {
m.vert_attr.erase(res); m.vert_attr.erase(res);
pa._padding = padd; pa._padding = padd;
std::pair<HWIte,bool > new_pa = m.vert_attr.insert(pa); std::pair<HWIte,bool > new_pa = m.vert_attr.insert(pa);
(void)new_pa;
assert(new_pa.second); assert(new_pa.second);
} }
else else
@ -155,6 +156,7 @@ namespace io {
m.face_attr.erase(res); m.face_attr.erase(res);
pa._padding = padd; pa._padding = padd;
std::pair<HWIte,bool > new_pa = m.face_attr.insert(pa); std::pair<HWIte,bool > new_pa = m.face_attr.insert(pa);
(void)new_pa;
assert(new_pa.second); assert(new_pa.second);
} }
else else
@ -180,6 +182,7 @@ namespace io {
m.mesh_attr.erase(res); m.mesh_attr.erase(res);
pa._padding = padd; pa._padding = padd;
std::pair<HWIte,bool > new_pa = m.mesh_attr.insert(pa); std::pair<HWIte,bool > new_pa = m.mesh_attr.insert(pa);
(void)new_pa;
assert(new_pa.second); assert(new_pa.second);
} }
else else