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

0026583: Eliminate compile warnings obtained by building occt with vc14: declaration of local variable hides function parameter

Eliminated warnings about "declaration of local variable hides function parameter"
This commit is contained in:
ski
2015-09-09 12:56:09 +03:00
committed by bugmaster
parent f0d3b7afa9
commit 464cd2fb16
10 changed files with 64 additions and 64 deletions

View 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;
}

View File

@@ -42,14 +42,14 @@
//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);

View 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(),

View 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;

View 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;

View 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

View 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)

View 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);
}
//=======================================================================

View 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()) {

View 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);