0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / ShapeAnalysis / ShapeAnalysis_CheckSmallFace.cxx
index 80b1ccc..e7fbcf8 100755 (executable)
@@ -1,3 +1,20 @@
+// Copyright (c) 1999-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
 #include <ShapeAnalysis_CheckSmallFace.ixx>
 #include <Standard_ErrorHandler.hxx>  
 #include <TopTools_ListOfShape.hxx>
@@ -215,7 +232,7 @@ static Standard_Boolean MinMaxSmall
     else     { nbu = bs->NbUPoles(), nbv = bs->NbVPoles(); }
     // Standard_Real dx = 0, dy = 0, dz = 0;
     // Standard_Real    x,y,z;
-    Standard_Real minx,miny,minz,maxx,maxy,maxz;
+    Standard_Real minx = 0.,miny = 0.,minz = 0.,maxx = 0.,maxy = 0.,maxz = 0.;
     Standard_Boolean issmall = Standard_True;
 
     for (iu = 1; iu <= nbu; iu ++) {
@@ -357,12 +374,13 @@ static Standard_Boolean MinMaxSmall
     else return Standard_False;
   }
   //   Now, check these two edge to define a strip !
-  if (!E1.IsNull()&&!E2.IsNull()) 
+  if (!E1.IsNull()&&!E2.IsNull()) {
     if(!CheckStripEdges (E1,E2,tol,dmax)) return Standard_False; 
-      else {   
-       myStatusStrip = ShapeExtend::EncodeStatus (ShapeExtend_DONE3);
-       return Standard_True ;
-      }
+    else {   
+      myStatusStrip = ShapeExtend::EncodeStatus (ShapeExtend_DONE3);
+      return Standard_True ;
+    }
+  }
   return Standard_False;
 }
 
@@ -409,7 +427,7 @@ static Standard_Boolean MinMaxSmall
 
 //    Edge on same vertex : small one ?
     if (VA.IsSame(VB)) {
-      Standard_Real cf,cl;
+      Standard_Real cf = 0.,cl = 0.;
       Handle(Geom_Curve) C3D;
       if (!BRep_Tool::Degenerated(E)) C3D = BRep_Tool::Curve (E,cf,cl);
       if (C3D.IsNull()) continue;  // DGNR
@@ -567,7 +585,7 @@ static Standard_Integer IsoStat
   Standard_Integer i, np = 0;
   Standard_Integer i0 = (uorv == 1 ? poles.LowerCol() : poles.LowerRow());
   Standard_Integer i1 = (uorv == 1 ? poles.UpperCol() : poles.UpperRow());
-  Standard_Real xmin,ymin,zmin, xmax,ymax,zmax;
+  Standard_Real xmin = 0.,ymin = 0.,zmin = 0., xmax = 0.,ymax = 0.,zmax = 0.;
   for (i = i0; i <= i1; i ++) {
     if (uorv == 1) MinMaxPnt (poles(rank,i),np,xmin,ymin,zmin, xmax,ymax,zmax);
     else      MinMaxPnt (poles(i,rank), np, xmin,ymin,zmin, xmax,ymax,zmax);
@@ -582,8 +600,10 @@ static Standard_Boolean CheckPoles(const TColgp_Array2OfPnt& poles, Standard_Int
   Standard_Integer i0 = (uorv == 1 ? poles.LowerCol() : poles.LowerRow());
   Standard_Integer i1 = (uorv == 1 ? poles.UpperCol() : poles.UpperRow());
   for (Standard_Integer i = i0; i <= i1-1; i ++) {
-    if (uorv == 1) if(poles(rank,i).IsEqual(poles(rank, i+1), 1e-15)) return Standard_True;
-    else      if(poles(i,rank).IsEqual(poles(i+1,rank), 1e-15)) return Standard_True;
+    if (uorv == 1) {
+      if(poles(rank,i).IsEqual(poles(rank, i+1), 1e-15)) return Standard_True;
+    } else
+      if(poles(i,rank).IsEqual(poles(i+1,rank), 1e-15)) return Standard_True;
   }  
   return Standard_False;
 }