harmless gcc warnings (ambiguous boolean expressions)

This commit is contained in:
Paolo Cignoni 2011-02-17 16:39:38 +00:00
parent 463c31e27a
commit 4c1a6502b2
1 changed files with 13 additions and 9 deletions

View File

@ -1021,15 +1021,19 @@ static void FaceSimilar(MetroMesh & m, VertexSampler &ps,int sampleNum, bool dua
{ {
Point2<S> close; Point2<S> close;
S dst; S dst;
if ( (!flipped && n[i]<0 || flipped && n[i]>0) && if ( ((!flipped) && (n[i]<0)) ||
(dst = ((close = ClosestPoint(borderEdges[i], px)) - px).Norm()) < minDst && ( flipped && (n[i]>0)) )
close.X() > px.X()-1 && close.X() < px.X()+1 && {
close.Y() > px.Y()-1 && close.Y() < px.Y()+1) dst = ((close = ClosestPoint(borderEdges[i], px)) - px).Norm();
{ if(dst < minDst &&
minDst = dst; close.X() > px.X()-1 && close.X() < px.X()+1 &&
closePoint = close; close.Y() > px.Y()-1 && close.Y() < px.Y()+1)
closeEdge = i; {
} minDst = dst;
closePoint = close;
closeEdge = i;
}
}
} }
} }