Small change to remove warning

This commit is contained in:
Paolo Cignoni 2017-03-24 15:18:14 +01:00
parent ff7711147e
commit 361250c867
1 changed files with 3 additions and 2 deletions

View File

@ -81,11 +81,12 @@ int main()
vcg::tri::Allocator<MyMesh>::DeleteFace(m,m.face[3]);
// If you loop in a mesh with deleted elements you have to skip them!
MyMesh::CoordType b(0,0,0);
for(fi = m.face.begin(); fi!=m.face.end(); ++fi )
{
if(!fi->IsD()) // <---- Check added
{
MyMesh::CoordType b = vcg::Barycenter(*fi);
b += vcg::Barycenter(*fi);
}
}
@ -94,7 +95,7 @@ int main()
{
if(!fi->IsD())
{
MyMesh::CoordType b = vcg::Barycenter(*fi);
b += vcg::Barycenter(*fi);
}
}