From 1407af253709149451ad7a6f4f6c5677d4b99fd5 Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 9 Jul 2008 10:31:55 +0000 Subject: [PATCH] removed harmless warnings --- vcg/complex/trimesh/allocate.h | 8 ++++---- vcg/complex/trimesh/clean.h | 4 ++-- vcg/simplex/faceplus/component_ocf.h | 1 - vcg/simplex/vertexplus/component_ocf.h | 1 - vcg/space/index/octree_template.h | 2 +- vcg/space/normal_extrapolation.h | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/vcg/complex/trimesh/allocate.h b/vcg/complex/trimesh/allocate.h index 835102c4..c5d07455 100644 --- a/vcg/complex/trimesh/allocate.h +++ b/vcg/complex/trimesh/allocate.h @@ -477,7 +477,7 @@ namespace vcg { for(i=0;i<3;++i) { size_t oldIndex = (*fi).V(i) - vbase; - assert(oldIndex >=0 && oldIndex < newVertIndex.size()); + assert(vbase <= (*fi).V(i) && oldIndex < newVertIndex.size()); (*fi).V(i) = vbase+newVertIndex[oldIndex]; } @@ -529,7 +529,7 @@ namespace vcg { if ((*vi).cVFp()!=0) { size_t oldIndex = (*vi).cVFp() - fbase; - assert(oldIndex >=0 && oldIndex < newFaceIndex.size()); + assert(fbase <= (*vi).cVFp() && oldIndex < newFaceIndex.size()); (*vi).VFp() = fbase+newFaceIndex[oldIndex]; } } @@ -548,7 +548,7 @@ namespace vcg { if ((*fi).cVFp(i)!=0) { size_t oldIndex = (*fi).VFp(i) - fbase; - assert(oldIndex >=0 && oldIndex < newFaceIndex.size()); + assert(fbase <= (*fi).VFp(i) && oldIndex < newFaceIndex.size()); (*fi).VFp(i) = fbase+newFaceIndex[oldIndex]; } if(HasFFAdjacency(m)) @@ -556,7 +556,7 @@ namespace vcg { if ((*fi).cFFp(i)!=0) { size_t oldIndex = (*fi).FFp(i) - fbase; - assert(oldIndex >=0 && oldIndex < newFaceIndex.size()); + assert(fbase <= (*fi).FFp(i) && oldIndex < newFaceIndex.size()); (*fi).FFp(i) = fbase+newFaceIndex[oldIndex]; } } diff --git a/vcg/complex/trimesh/clean.h b/vcg/complex/trimesh/clean.h index 83797220..5012a54e 100644 --- a/vcg/complex/trimesh/clean.h +++ b/vcg/complex/trimesh/clean.h @@ -334,7 +334,7 @@ private: if(m.vert.size()==0 || m.vn==0) return 0; std::map mp; - int i,j; + size_t i,j; VertexIterator vi; int deleted=0; int k=0; @@ -489,7 +489,7 @@ private: ToDelVec.push_back(&*fi); } - for(int i=0;iIsD()) { diff --git a/vcg/simplex/faceplus/component_ocf.h b/vcg/simplex/faceplus/component_ocf.h index 038b565b..000b3cc6 100644 --- a/vcg/simplex/faceplus/component_ocf.h +++ b/vcg/simplex/faceplus/component_ocf.h @@ -239,7 +239,6 @@ public: // this function is called by the specialized Reorder function, that is called whenever someone call the allocator::CompactVertVector void ReorderFace(std::vector &newFaceIndex ) { - size_t pos=0; size_t i=0; if (ColorEnabled) assert( CV.size() == newFaceIndex.size() ); if (MarkEnabled) assert( MV.size() == newFaceIndex.size() ); diff --git a/vcg/simplex/vertexplus/component_ocf.h b/vcg/simplex/vertexplus/component_ocf.h index 072cbed1..1a4af66a 100644 --- a/vcg/simplex/vertexplus/component_ocf.h +++ b/vcg/simplex/vertexplus/component_ocf.h @@ -171,7 +171,6 @@ public: // this function is called by the specialized Reorder function, that is called whenever someone call the allocator::CompactVertVector void ReorderVert(std::vector &newVertIndex ) { - size_t pos=0; size_t i=0; if (ColorEnabled) assert( CV.size() == newVertIndex.size() ); if (MarkEnabled) assert( MV.size() == newVertIndex.size() ); diff --git a/vcg/space/index/octree_template.h b/vcg/space/index/octree_template.h index e6b880c1..89a4e5c6 100644 --- a/vcg/space/index/octree_template.h +++ b/vcg/space/index/octree_template.h @@ -137,7 +137,7 @@ protected: inline NodePointer &Son(int /*sonIndex*/) { assert(false); - NodePointer p = NULL; + static NodePointer p = NULL; return p; } diff --git a/vcg/space/normal_extrapolation.h b/vcg/space/normal_extrapolation.h index 2bc3b602..f7f22668 100644 --- a/vcg/space/normal_extrapolation.h +++ b/vcg/space/normal_extrapolation.h @@ -222,7 +222,7 @@ namespace vcg octree_for_plane.GetKClosest (ppdf, dom, kk, iPlane->center, max_distance, nearest_planes, distances, nearest_points, true, false); - for (int n=0; nindexindex) riemannian_graph[iPlane->index].push_back( RiemannianEdge( nearest_planes[n], 1.0f - fabs(iPlane->normal * nearest_planes[n]->normal)) ); }