1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0024171: Eliminate CLang compiler warning -Wreorder

Got rid of -Wreorder warning (wrong fields' initialization order); some warnings -Wdangling-else are also fixed
This commit is contained in:
omy
2013-09-12 11:30:34 +04:00
committed by abv
parent 105aae761e
commit eafb234bf1
63 changed files with 608 additions and 456 deletions

View File

@@ -666,9 +666,10 @@ Standard_Integer ShapeFix_ComposeShell::ComputeCode (const Handle(ShapeExtend_Wi
}
}
if ( j < np ) { i = 0; break; } // not tangency
if ( i == endInd )
if ( i == endInd ) {
if ( special <=0 ) break;
else special = -1;
}
}
if ( myClosedMode ) {
if ( code != IOR_UNDEF && ! begin ) {

View File

@@ -1399,16 +1399,18 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
if ( ::Precision::IsInfinite ( SUF ) || ::Precision::IsInfinite ( SUL ) ) {
if ( ::Precision::IsInfinite ( SUF ) ) SUF = fU1;
if ( ::Precision::IsInfinite ( SUL ) ) SUL = fU2;
if(Abs(SUL-SUF) < ::Precision::PConfusion())
if(Abs(SUL-SUF) < ::Precision::PConfusion()) {
if ( ::Precision::IsInfinite ( SUF ) ) SUF-=1000.;
else SUL+=1000.;
}
}
if ( ::Precision::IsInfinite ( SVF ) || ::Precision::IsInfinite ( SVL ) ) {
if ( ::Precision::IsInfinite ( SVF ) ) SVF = fV1;
if ( ::Precision::IsInfinite ( SVL ) ) SVL = fV2;
if(Abs(SVL-SVF) < ::Precision::PConfusion())
if(Abs(SVL-SVF) < ::Precision::PConfusion()) {
if ( ::Precision::IsInfinite ( SVF ) ) SVF-=1000.;
else SVL+=1000.;
}
}
URange = Abs ( SUL - SUF );
@@ -1629,9 +1631,10 @@ Standard_Boolean ShapeFix_Face::FixMissingSeam()
vf = pos1.Y();
}
}
if ( skipU && skipV )
if ( skipU && skipV ) {
if ( i1 <= nb1 ) continue;
else break;
}
// or yet better - if it is end of some edges on both wires
for ( Standard_Integer i2 = 1; i1 <= nb1 && i2 <= nb2; i2++ ) {
TopoDS_Edge edge2 = wd2->Edge ( i2 );

View File

@@ -1302,9 +1302,10 @@ Standard_Boolean ShapeFix_Wire::FixShifted()
SVMid = 0.5*(SVF+SVL);
if (uclosed) URange = Abs ( SUL - SUF );
else URange = RealLast();
if (!IsVCrvClosed)
if (!IsVCrvClosed) {
if (vclosed) VRange = Abs ( SVL - SVF );
else VRange = RealLast();
}
Standard_Real UTol = 0.2 * URange, VTol = 0.2 * VRange;
Handle(ShapeExtend_WireData) sbwdOring = WireData();