0026583: Eliminate compile warnings obtained by building occt with vc14: declaration...
authorski <ski@opencascade.com>
Wed, 9 Sep 2015 09:56:09 +0000 (12:56 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 10 Sep 2015 14:01:15 +0000 (17:01 +0300)
Eliminated warnings about "declaration of local variable hides function parameter"

src/BRepAlgo/BRepAlgo_Image.cxx
src/BRepCheck/BRepCheck_Shell.cxx
src/BRepFeat/BRepFeat.cxx
src/GeomFill/GeomFill_CorrectedFrenet.cxx
src/HLRBRep/HLRBRep_PolyAlgo.cxx
src/IGESDimen/IGESDimen_ToolOrdinateDimension.cxx
src/IVtkOCC/IVtkOCC_ShapeMesher.cxx
src/IntPatch/IntPatch_Intersection.cxx
src/ShapeFix/ShapeFix_Solid.cxx
src/TNaming/TNaming_NamingTool.cxx

index 53c6f19..496750f 100644 (file)
@@ -298,9 +298,9 @@ void BRepAlgo_Image::Filter(const TopoDS_Shape&     S,
     Change = Standard_False;
     TopTools_DataMapIteratorOfDataMapOfShapeShape mit(up);
     for (; mit.More(); mit.Next()) {
-      const TopoDS_Shape& S = mit.Key();
-      if (S.ShapeType() == T && !M.Contains(S)) {
-       Remove(S);
+      const TopoDS_Shape& aS = mit.Key();
+      if (aS.ShapeType() == T && !M.Contains(aS)) {
+       Remove(aS);
        Change = Standard_True;
        break;
       }
index f0d9bbd..8b87af5 100644 (file)
 //purpose  : 
 //=======================================================================
 static void Propagate(const TopTools_IndexedDataMapOfShapeListOfShape& mapEF,
-                     const TopoDS_Shape& fac,
+                     const TopoDS_Shape& theFac,
                      TopTools_MapOfShape& mapF)
 {
-  if (mapF.Contains(fac))
+  if (mapF.Contains(theFac))
   {
     return;
   }
-  mapF.Add(fac);  // attention, if oriented == Standard_True, fac should
+  mapF.Add(theFac);  // attention, if oriented == Standard_True, fac should
                   // be FORWARD or REVERSED. It is not checked.
 
   TopTools_MapIteratorOfMapOfShape itf(mapF);
index 3066daa..e4afcea 100644 (file)
@@ -203,14 +203,14 @@ void BRepFeat::ParametricMinMax(const TopoDS_Shape& S,
                                 Standard_Real& prbmin,
                                 Standard_Real& prbmax,
                                 Standard_Boolean& flag,
-                                const Standard_Boolean Ori)
+                                const Standard_Boolean theOri)
 {
   LocOpe_CSIntersector ASI(S);
   TColGeom_SequenceOfCurve scur;
   scur.Append(CC);
   ASI.Perform(scur);
   if(ASI.IsDone() && ASI.NbPoints(1) >=1) {
-    if (!Ori) {
+    if (!theOri) {
       prmin = Min(ASI.Point(1,1).Parameter(), 
                   ASI.Point(1, ASI.NbPoints(1)).Parameter());
       prmax = Max(ASI.Point(1,1).Parameter(), 
index f0d50c9..0dd4aee 100644 (file)
@@ -198,13 +198,13 @@ static void smoothlaw(Handle(Law_BSpline)& Law,
 // Function : FindPlane
 // Purpose : 
 //===============================================================
-static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& c,
-                                   Handle( Geom_Plane )& P )
+static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& theC,
+                                   Handle( Geom_Plane )& theP )
 {
   Standard_Boolean found = Standard_True;
   Handle(TColgp_HArray1OfPnt) TabP;
 
-  switch (c->GetType()) {
+  switch (theC->GetType()) {
     
   case GeomAbs_Line:
     {
@@ -213,24 +213,24 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& c,
     break;
     
   case GeomAbs_Circle:
-    P = new Geom_Plane(gp_Ax3(c->Circle().Position()));
+    theP = new Geom_Plane(gp_Ax3(theC->Circle().Position()));
     break;
     
   case GeomAbs_Ellipse:
-    P = new Geom_Plane(gp_Ax3(c->Ellipse().Position()));
+    theP = new Geom_Plane(gp_Ax3(theC->Ellipse().Position()));
     break;
     
   case GeomAbs_Hyperbola:
-    P = new Geom_Plane(gp_Ax3(c->Hyperbola().Position()));
+    theP = new Geom_Plane(gp_Ax3(theC->Hyperbola().Position()));
     break;
     
   case GeomAbs_Parabola:
-    P = new Geom_Plane(gp_Ax3(c->Parabola().Position()));
+    theP = new Geom_Plane(gp_Ax3(theC->Parabola().Position()));
     break;
     
   case GeomAbs_BezierCurve:
     {
-      Handle(Geom_BezierCurve) GC = c->Bezier();
+      Handle(Geom_BezierCurve) GC = theC->Bezier();
       Standard_Integer nbp = GC->NbPoles();
       if ( nbp < 2) 
        found = Standard_False;
@@ -246,7 +246,7 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& c,
     
   case GeomAbs_BSplineCurve:
     {
-      Handle(Geom_BSplineCurve) GC = c->BSpline();
+      Handle(Geom_BSplineCurve) GC = theC->BSpline();
       Standard_Integer nbp = GC->NbPoles();
       if ( nbp < 2) 
        found = Standard_False;
@@ -262,16 +262,16 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& c,
     
   default:
     { // On utilise un echantillonage
-      Standard_Integer nbp = 15 + c->NbIntervals(GeomAbs_C3);
+      Standard_Integer nbp = 15 + theC->NbIntervals(GeomAbs_C3);
       Standard_Real f, l, t, inv;
       Standard_Integer ii;
-      f = c->FirstParameter();
-      l = c->LastParameter();
+      f = theC->FirstParameter();
+      l = theC->LastParameter();
       inv = 1./(nbp-1);
       for (ii=1; ii<=nbp; ii++) {
        t = ( f*(nbp-ii) + l*(ii-1));
        t *= inv;
-       TabP->SetValue(ii, c->Value(t));
+       TabP->SetValue(ii, theC->Value(t));
       }
     }
   }
@@ -284,7 +284,7 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& c,
       found = Standard_False;
     }
     else {
-      P = new Geom_Plane(inertia);
+      theP = new Geom_Plane(inertia);
     }
     if (found)
       {
@@ -292,7 +292,7 @@ static Standard_Boolean FindPlane ( const Handle(Adaptor3d_HCurve)& c,
 //     Standard_Boolean isOnPlane;
        Standard_Real a,b,c,d, dist;
        Standard_Integer ii;
-       P->Coefficients(a,b,c,d);
+  theP->Coefficients(a,b,c,d);
        for (ii=1; ii<=TabP->Length() && found; ii++) {
          const gp_XYZ& xyz = TabP->Value(ii).XYZ();
          dist = a*xyz.X() + b*xyz.Y() + c*xyz.Z() + d;
index ba6bae4..5d10e37 100644 (file)
@@ -3105,16 +3105,16 @@ UpdateAroundNode (const Standard_Integer iNode,
        &(((HLRAlgo_Array1OfPINod*)PINod)->ChangeValue(Tri1Node2));
       const Handle(HLRAlgo_PolyInternalNode)* PN3 = 
        &(((HLRAlgo_Array1OfPINod*)PINod)->ChangeValue(Tri1Node3));
-      const Standard_Address Nod1Indices = (*PN1)->Indices();
-      const Standard_Address Nod2Indices = (*PN2)->Indices();
-      const Standard_Address Nod3Indices = (*PN3)->Indices();
-      const Standard_Address Nod1RValues = (*PN1)->RValues();
-      const Standard_Address Nod2RValues = (*PN2)->RValues();
-      const Standard_Address Nod3RValues = (*PN3)->RValues();
+      const Standard_Address aNod1Indices = (*PN1)->Indices();
+      const Standard_Address aNod2Indices = (*PN2)->Indices();
+      const Standard_Address aNod3Indices = (*PN3)->Indices();
+      const Standard_Address aNod1RValues = (*PN1)->RValues();
+      const Standard_Address aNod2RValues = (*PN2)->RValues();
+      const Standard_Address aNod3RValues = (*PN3)->RValues();
       OrientTriangle(iTri1,Tri1Indices,
-                    Nod1Indices,Nod1RValues,
-                    Nod2Indices,Nod2RValues,
-                    Nod3Indices,Nod3RValues);
+                    aNod1Indices,aNod1RValues,
+                    aNod2Indices,aNod2RValues,
+                    aNod3Indices,aNod3RValues);
     }
     if ( iTri2 != 0) {
       const Standard_Address Tri2Indices =
@@ -3125,16 +3125,16 @@ UpdateAroundNode (const Standard_Integer iNode,
        &(((HLRAlgo_Array1OfPINod*)PINod)->ChangeValue(Tri2Node2));
       const Handle(HLRAlgo_PolyInternalNode)* PN3 = 
        &(((HLRAlgo_Array1OfPINod*)PINod)->ChangeValue(Tri2Node3));
-      const Standard_Address Nod1Indices = (*PN1)->Indices();
-      const Standard_Address Nod2Indices = (*PN2)->Indices();
-      const Standard_Address Nod3Indices = (*PN3)->Indices();
-      const Standard_Address Nod1RValues = (*PN1)->RValues();
-      const Standard_Address Nod2RValues = (*PN2)->RValues();
-      const Standard_Address Nod3RValues = (*PN3)->RValues();
+      const Standard_Address aNod1Indices = (*PN1)->Indices();
+      const Standard_Address aNod2Indices = (*PN2)->Indices();
+      const Standard_Address aNod3Indices = (*PN3)->Indices();
+      const Standard_Address aNod1RValues = (*PN1)->RValues();
+      const Standard_Address aNod2RValues = (*PN2)->RValues();
+      const Standard_Address aNod3RValues = (*PN3)->RValues();
       OrientTriangle(iTri2,Tri2Indices,
-                    Nod1Indices,Nod1RValues,
-                    Nod2Indices,Nod2RValues,
-                    Nod3Indices,Nod3RValues);
+                    aNod1Indices,aNod1RValues,
+                    aNod2Indices,aNod2RValues,
+                    aNod3Indices,aNod3RValues);
     }
     if (Seg1LstSg1 == iNode) iiii = Seg1NxtSg1;
     else                     iiii = Seg1NxtSg2;
index 3ca7d17..8b9d2c8 100644 (file)
@@ -39,7 +39,7 @@ IGESDimen_ToolOrdinateDimension::IGESDimen_ToolOrdinateDimension ()    {  }
 
 
 void IGESDimen_ToolOrdinateDimension::ReadOwnParams
-  (const Handle(IGESDimen_OrdinateDimension)& ent,
+  (const Handle(IGESDimen_OrdinateDimension)& theEnt,
    const Handle(IGESData_IGESReaderData)& IR, IGESData_ParamReader& PR) const
 {
   Handle(IGESDimen_GeneralNote) tempNote;
@@ -50,7 +50,7 @@ void IGESDimen_ToolOrdinateDimension::ReadOwnParams
   PR.ReadEntity(IR,PR.Current(),"General Note",
                STANDARD_TYPE(IGESDimen_GeneralNote),tempNote);
 
-  if (ent->FormNumber() == 0)
+  if (theEnt->FormNumber() == 0)
     {
       Handle(IGESData_IGESEntity) ent;
       if (!PR.ReadEntity(IR,PR.Current(),"Line or Leader", ent)) { }    // WARNING : Two possible Types allowed :
@@ -74,8 +74,8 @@ void IGESDimen_ToolOrdinateDimension::ReadOwnParams
                    STANDARD_TYPE(IGESDimen_LeaderArrow), leadArr);
     }
 
-  DirChecker(ent).CheckTypeAndForm(PR.CCheck(),ent);
-  ent->Init ( tempNote, isLine, witLine, leadArr);
+  DirChecker(theEnt).CheckTypeAndForm(PR.CCheck(), theEnt);
+  theEnt->Init ( tempNote, isLine, witLine, leadArr);
 }
 
 void IGESDimen_ToolOrdinateDimension::WriteOwnParams
index fe70532..6b8dcbc 100644 (file)
@@ -484,18 +484,18 @@ static void DrawCurve (Adaptor3d_Curve&      theCurve,
       Standard_Integer anI, aJ;
       TColStd_Array1OfReal aParams(1, aNbInter+1);
       theCurve.Intervals(aParams, GeomAbs_C1);
-      Standard_Real theU1, theU2;
+      Standard_Real anU1, anU2;
       Standard_Integer NumberOfPoints;
 
       for (aJ = 1; aJ <= aNbInter; aJ++)
       {
-        theU1 = aParams (aJ); theU2 = aParams (aJ + 1);
-        if (theU2 > theU1 && theU1 < theU2)
+        anU1 = aParams (aJ); anU2 = aParams (aJ + 1);
+        if (anU2 > anU1 && anU1 < anU2)
         {
-          theU1 = Max(theU1, theU1);
-          theU2 = Min(theU2, theU2);
+          anU1 = Max(anU1, anU1);
+          anU2 = Min(anU2, anU2);
 
-          GCPnts_TangentialDeflection anAlgo (theCurve, theU1, theU2, theAngle, theDeflection);
+          GCPnts_TangentialDeflection anAlgo (theCurve, anU1, anU2, theAngle, theDeflection);
           NumberOfPoints = anAlgo.NbPoints();
 
           if (NumberOfPoints > 0)
index 0dec3fe..d39eb9a 100644 (file)
@@ -1679,8 +1679,8 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
                                            const Standard_Real TolTang,
                                            IntSurf_ListOfPntOn2S& ListOfPnts,
                                            const Standard_Boolean RestrictLine,
-                                           const GeomAbs_SurfaceType typs1,
-                                           const GeomAbs_SurfaceType typs2,
+                                           const GeomAbs_SurfaceType theTyps1,
+                                           const GeomAbs_SurfaceType theTyps2,
                                            const Standard_Boolean theIsReqToKeepRLine)
 {
   IntPatch_ImpImpIntersection interii(theS1,theD1,theS2,theD2,
@@ -1701,11 +1701,11 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
         const Handle(IntPatch_Line)& line = interii.Line(i);
         if (line->ArcType() == IntPatch_Analytic)
         {
-          const GeomAbs_SurfaceType typs1 = theS1->GetType();
-          const GeomAbs_SurfaceType typs2 = theS2->GetType();
+          const GeomAbs_SurfaceType aTyps1 = theS1->GetType();
+          const GeomAbs_SurfaceType aTyps2 = theS2->GetType();
           IntSurf_Quadric Quad1,Quad2;
           
-          switch(typs1)
+          switch(aTyps1)
           {
           case GeomAbs_Plane:
             Quad1.SetValue(theS1->Plane());
@@ -1731,7 +1731,7 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
             break;
           }
 
-          switch(typs2)
+          switch(aTyps2)
           {
           case GeomAbs_Plane:
             Quad2.SetValue(theS2->Plane());
@@ -1772,7 +1772,7 @@ void IntPatch_Intersection::GeomGeomPerfom(const Handle(Adaptor3d_HSurface)& the
   }
   else
     ParamParamPerfom(theS1, theD1, theS2, theD2, 
-                TolArc, TolTang, ListOfPnts, RestrictLine, typs1, typs2);
+                TolArc, TolTang, ListOfPnts, RestrictLine, theTyps1, theTyps2);
 }
 
 //=======================================================================
index f8a6f48..9fbad43 100644 (file)
@@ -254,12 +254,12 @@ static void CollectSolids(const TopTools_SequenceOfShape& aSeqShells ,
 //purpose  : 
 //=======================================================================
 
-static Standard_Boolean CreateSolids(const TopoDS_Shape aShape,TopTools_IndexedMapOfShape& aMapSolids)
+static Standard_Boolean CreateSolids(const TopoDS_Shape theShape,TopTools_IndexedMapOfShape& aMapSolids)
 {
   TopTools_SequenceOfShape aSeqShells;
   Standard_Boolean isDone = Standard_False;
 
-  for(TopExp_Explorer aExpShell(aShape,TopAbs_SHELL); aExpShell.More(); aExpShell.Next()) {
+  for(TopExp_Explorer aExpShell(theShape,TopAbs_SHELL); aExpShell.More(); aExpShell.Next()) {
     aSeqShells.Append(aExpShell.Current());
   }
   TopTools_IndexedDataMapOfShapeListOfShape aMapShellHoles;
@@ -336,14 +336,14 @@ static Standard_Boolean CreateSolids(const TopoDS_Shape aShape,TopTools_IndexedM
   }
   //Creation of compsolid from shells containing shared faces. 
   TopTools_IndexedDataMapOfShapeListOfShape aMapFaceShells;
-  TopExp::MapShapesAndAncestors(aShape,TopAbs_FACE,TopAbs_SHELL,aMapFaceShells); 
+  TopExp::MapShapesAndAncestors(theShape,TopAbs_FACE,TopAbs_SHELL,aMapFaceShells);
   for(Standard_Integer i =1; i <= aMapFaceShells.Extent(); i++) {
     const TopTools_ListOfShape& lshells = aMapFaceShells.FindFromIndex(i);
     if(lshells.Extent() <2) continue;
     TopoDS_CompSolid aCompSolid;
     BRep_Builder aB;
     aB.MakeCompSolid(aCompSolid);
-    isDone = (aShape.ShapeType() != TopAbs_COMPSOLID || isDone);
+    isDone = (theShape.ShapeType() != TopAbs_COMPSOLID || isDone);
     Standard_Integer nbSol = 0;
 
     for(TopTools_ListIteratorOfListOfShape lItSh(lshells);lItSh.More(); lItSh.Next()) {
index d091b56..389848a 100644 (file)
@@ -96,8 +96,8 @@ static void LastModif(      TNaming_NewShapeIterator& it,
       YaModif = Standard_True;
       TNaming_NewShapeIterator it2(it);
       if (!it2.More()) {
-       const TopoDS_Shape& S   = it.Shape();
-       MS.Add (S);  // Modified
+       const TopoDS_Shape& aS   = it.Shape();
+       MS.Add (aS);  // Modified
       }
       else
        LastModif(it2,it.Shape(),MS,Updated,Forbiden);