removed harmless warnings

This commit is contained in:
Paolo Cignoni 2008-07-09 10:31:55 +00:00
parent 72ce36f55c
commit 1407af2537
6 changed files with 8 additions and 10 deletions

View File

@ -477,7 +477,7 @@ namespace vcg {
for(i=0;i<3;++i) for(i=0;i<3;++i)
{ {
size_t oldIndex = (*fi).V(i) - vbase; 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]; (*fi).V(i) = vbase+newVertIndex[oldIndex];
} }
@ -529,7 +529,7 @@ namespace vcg {
if ((*vi).cVFp()!=0) if ((*vi).cVFp()!=0)
{ {
size_t oldIndex = (*vi).cVFp() - fbase; size_t oldIndex = (*vi).cVFp() - fbase;
assert(oldIndex >=0 && oldIndex < newFaceIndex.size()); assert(fbase <= (*vi).cVFp() && oldIndex < newFaceIndex.size());
(*vi).VFp() = fbase+newFaceIndex[oldIndex]; (*vi).VFp() = fbase+newFaceIndex[oldIndex];
} }
} }
@ -548,7 +548,7 @@ namespace vcg {
if ((*fi).cVFp(i)!=0) if ((*fi).cVFp(i)!=0)
{ {
size_t oldIndex = (*fi).VFp(i) - fbase; 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]; (*fi).VFp(i) = fbase+newFaceIndex[oldIndex];
} }
if(HasFFAdjacency(m)) if(HasFFAdjacency(m))
@ -556,7 +556,7 @@ namespace vcg {
if ((*fi).cFFp(i)!=0) if ((*fi).cFFp(i)!=0)
{ {
size_t oldIndex = (*fi).FFp(i) - fbase; 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]; (*fi).FFp(i) = fbase+newFaceIndex[oldIndex];
} }
} }

View File

@ -334,7 +334,7 @@ private:
if(m.vert.size()==0 || m.vn==0) return 0; if(m.vert.size()==0 || m.vn==0) return 0;
std::map<VertexPointer, VertexPointer> mp; std::map<VertexPointer, VertexPointer> mp;
int i,j; size_t i,j;
VertexIterator vi; VertexIterator vi;
int deleted=0; int deleted=0;
int k=0; int k=0;
@ -489,7 +489,7 @@ private:
ToDelVec.push_back(&*fi); ToDelVec.push_back(&*fi);
} }
for(int i=0;i<ToDelVec.size();++i) for(size_t i=0;i<ToDelVec.size();++i)
{ {
if(!ToDelVec[i]->IsD()) if(!ToDelVec[i]->IsD())
{ {

View File

@ -239,7 +239,6 @@ public:
// this function is called by the specialized Reorder function, that is called whenever someone call the allocator::CompactVertVector // this function is called by the specialized Reorder function, that is called whenever someone call the allocator::CompactVertVector
void ReorderFace(std::vector<size_t> &newFaceIndex ) void ReorderFace(std::vector<size_t> &newFaceIndex )
{ {
size_t pos=0;
size_t i=0; size_t i=0;
if (ColorEnabled) assert( CV.size() == newFaceIndex.size() ); if (ColorEnabled) assert( CV.size() == newFaceIndex.size() );
if (MarkEnabled) assert( MV.size() == newFaceIndex.size() ); if (MarkEnabled) assert( MV.size() == newFaceIndex.size() );

View File

@ -171,7 +171,6 @@ public:
// this function is called by the specialized Reorder function, that is called whenever someone call the allocator::CompactVertVector // this function is called by the specialized Reorder function, that is called whenever someone call the allocator::CompactVertVector
void ReorderVert(std::vector<size_t> &newVertIndex ) void ReorderVert(std::vector<size_t> &newVertIndex )
{ {
size_t pos=0;
size_t i=0; size_t i=0;
if (ColorEnabled) assert( CV.size() == newVertIndex.size() ); if (ColorEnabled) assert( CV.size() == newVertIndex.size() );
if (MarkEnabled) assert( MV.size() == newVertIndex.size() ); if (MarkEnabled) assert( MV.size() == newVertIndex.size() );

View File

@ -137,7 +137,7 @@ protected:
inline NodePointer &Son(int /*sonIndex*/) inline NodePointer &Son(int /*sonIndex*/)
{ {
assert(false); assert(false);
NodePointer p = NULL; static NodePointer p = NULL;
return p; return p;
} }

View File

@ -222,7 +222,7 @@ namespace vcg
octree_for_plane.GetKClosest octree_for_plane.GetKClosest
(ppdf, dom, kk, iPlane->center, max_distance, nearest_planes, distances, nearest_points, true, false); (ppdf, dom, kk, iPlane->center, max_distance, nearest_planes, distances, nearest_points, true, false);
for (int n=0; n<k; n++) for (unsigned int n=0; n<k; n++)
if (iPlane->index<nearest_planes[n]->index) if (iPlane->index<nearest_planes[n]->index)
riemannian_graph[iPlane->index].push_back( RiemannianEdge( nearest_planes[n], 1.0f - fabs(iPlane->normal * nearest_planes[n]->normal)) ); riemannian_graph[iPlane->index].push_back( RiemannianEdge( nearest_planes[n], 1.0f - fabs(iPlane->normal * nearest_planes[n]->normal)) );
} }