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

0026586: Eliminate compile warnings obtained by building occt with vc14: declaration of local variable hides previous local declaration

Eliminated warnings about "declaration of some local variable hides previous local declaration"
This commit is contained in:
ski
2015-09-08 15:41:26 +03:00
committed by bugmaster
parent 695c6eed26
commit 5174095875
186 changed files with 1382 additions and 1466 deletions

View File

@@ -735,9 +735,9 @@ void ProjLib_CompProjectedCurve::Init()
{
//Search for exact boundary point
Tol = Min(myTolU, myTolV);
gp_Vec2d D;
d1(Triple.X(), Triple.Y(), Triple.Z(), D, myCurve, mySurface);
Tol /= Max(Abs(D.X()), Abs(D.Y()));
gp_Vec2d aD;
d1(Triple.X(), Triple.Y(), Triple.Z(), aD, myCurve, mySurface);
Tol /= Max(Abs(aD.X()), Abs(aD.Y()));
if(!ExactBound(Triple, t - Step, Tol,
myTolU, myTolV, myCurve, mySurface))
@@ -931,11 +931,11 @@ void ProjLib_CompProjectedCurve::Init()
for(i = 1; i <= myNbCurves; i++)
for(j = 1; j <= mySequence->Value(i)->Length(); j++)
{
gp_Pnt POnC, POnS, Triple;
gp_Pnt POnC, POnS, aTriple;
Standard_Real Distance;
Triple = mySequence->Value(i)->Value(j);
myCurve->D0(Triple.X(), POnC);
mySurface->D0(Triple.Y(), Triple.Z(), POnS);
aTriple = mySequence->Value(i)->Value(j);
myCurve->D0(aTriple.X(), POnC);
mySurface->D0(aTriple.Y(), aTriple.Z(), POnS);
Distance = POnC.Distance(POnS);
if (myMaxDistance->Value(i) < Distance)
myMaxDistance->ChangeValue(i) = Distance;
@@ -1245,12 +1245,12 @@ void ProjLib_CompProjectedCurve::D0(const Standard_Real U,gp_Pnt2d& P) const
Extrema_ExtPS aExtPS(thePoint, mySurface->Surface(), myTolU, myTolV);
if (aExtPS.IsDone() && aExtPS.NbExt())
{
Standard_Integer i, Nend, imin = 1;
Standard_Integer k, Nend, imin = 1;
// Search for the nearest solution which is also a normal projection
Nend = aExtPS.NbExt();
for(i = 2; i <= Nend; i++)
if (aExtPS.SquareDistance(i) < aExtPS.SquareDistance(imin))
imin = i;
for(k = 2; k <= Nend; k++)
if (aExtPS.SquareDistance(k) < aExtPS.SquareDistance(imin))
imin = k;
const Extrema_POnSurf& POnS = aExtPS.Point(imin);
Standard_Real ParU,ParV;
POnS.Parameter(ParU, ParV);

View File

@@ -1270,13 +1270,13 @@ Handle(Adaptor2d_HCurve2d)
}
}
if(!myProjIsDone && uperiod) {
Standard_Real Uinf, Usup, Uaux;
Uinf = Surf->Surface().FirstUParameter();
Usup = Surf->Surface().LastUParameter();
if((Usup - U0) > (U0 - Uinf))
Uaux = 2*Uinf - U0 + uperiod;
Standard_Real aUinf, aUsup, Uaux;
aUinf = Surf->Surface().FirstUParameter();
aUsup = Surf->Surface().LastUParameter();
if((aUsup - U0) > (U0 - aUinf))
Uaux = 2*aUinf - U0 + uperiod;
else
Uaux = 2*Usup - U0 - uperiod;
Uaux = 2*aUsup - U0 - uperiod;
Extrema_GenLocateExtPS locext(pntproj,
Surf->Surface(),
Uaux, V0, TolU, TolV);
@@ -1284,7 +1284,7 @@ Handle(Adaptor2d_HCurve2d)
if (locext.SquareDistance() < DistTol3d * DistTol3d) { //OCC217
//if (locext.SquareDistance() < Tol3d * Tol3d) {
(locext.Point()).Parameter(u,v);
if((Usup - U0) > (U0 - Uinf))
if((aUsup - U0) > (U0 - aUinf))
usens--;
else
usens++;
@@ -1296,13 +1296,13 @@ Handle(Adaptor2d_HCurve2d)
}
}
if(!myProjIsDone && vperiod) {
Standard_Real Vinf, Vsup, Vaux;
Vinf = Surf->Surface().FirstVParameter();
Vsup = Surf->Surface().LastVParameter();
if((Vsup - V0) > (V0 - Vinf))
Vaux = 2*Vinf - V0 + vperiod;
Standard_Real aVinf, aVsup, Vaux;
aVinf = Surf->Surface().FirstVParameter();
aVsup = Surf->Surface().LastVParameter();
if((aVsup - V0) > (V0 - aVinf))
Vaux = 2*aVinf - V0 + vperiod;
else
Vaux = 2*Vsup - V0 - vperiod;
Vaux = 2*aVsup - V0 - vperiod;
Extrema_GenLocateExtPS locext(pntproj,
Surf->Surface(),
U0, Vaux, TolU, TolV) ;
@@ -1310,7 +1310,7 @@ Handle(Adaptor2d_HCurve2d)
if (locext.SquareDistance() < DistTol3d * DistTol3d) { //OCC217
//if (locext.SquareDistance() < Tol3d * Tol3d) {
(locext.Point()).Parameter(u,v);
if((Vsup - V0) > (V0 - Vinf))
if((aVsup - V0) > (V0 - aVinf))
vsens--;
else
vsens++;
@@ -1357,15 +1357,15 @@ Handle(Adaptor2d_HCurve2d)
Extrema_ExtPS ext(pntproj, Surf->Surface(), TolU, TolV) ;
if (ext.IsDone()) {
Dist2Min = ext.SquareDistance(1);
Standard_Integer GoodValue = 1;
Standard_Integer aGoodValue = 1;
for ( j = 2 ; j <= ext.NbExt() ; j++ )
if( Dist2Min > ext.SquareDistance(j)) {
Dist2Min = ext.SquareDistance(j);
GoodValue = j;
aGoodValue = j;
}
if (Dist2Min < DistTol3d * DistTol3d) {
//if (Dist2Min < Tol3d * Tol3d) {
(ext.Point(GoodValue)).Parameter(u,v);
(ext.Point(aGoodValue)).Parameter(u,v);
if(uperiod) {
if((U0 - u) > (2*uperiod/3)) {
usens++;
@@ -1772,14 +1772,14 @@ Handle(Geom2d_BSplineCurve)
Standard_True);
if(Fit.IsAllApproximated()) {
Standard_Integer i;
Standard_Integer j;
Standard_Integer NbCurves = Fit.NbMultiCurves();
Standard_Integer MaxDeg = 0;
// To transform the MultiCurve into BSpline, it is required that all
// Bezier constituing it have the same degree -> Calculation of MaxDeg
Standard_Integer NbPoles = 1;
for (i = 1; i <= NbCurves; i++) {
Standard_Integer Deg = Fit.Value(i).Degree();
for (j = 1; j <= NbCurves; j++) {
Standard_Integer Deg = Fit.Value(j).Degree();
MaxDeg = Max ( MaxDeg, Deg);
}
@@ -1804,15 +1804,15 @@ Handle(Geom2d_BSplineCurve)
BSplCLib::IncreaseDegree( MaxDeg, Poles2d, PLib::NoWeights(),
TempPoles, PLib::NoWeights());
//update of tops of the PCurve
for (Standard_Integer j = 1 ; j <= MaxDeg + 1; j++) {
Poles.SetValue( Compt, TempPoles( j));
for (Standard_Integer k = 1 ; k <= MaxDeg + 1; k++) {
Poles.SetValue( Compt, TempPoles( k));
Compt++;
}
}
else {
//update of tops of the PCurve
for (Standard_Integer j = 1 ; j <= MaxDeg + 1; j++) {
Poles.SetValue( Compt, Poles2d( j));
for (Standard_Integer k = 1 ; k <= MaxDeg + 1; k++) {
Poles.SetValue( Compt, Poles2d( k));
Compt++;
}
}

View File

@@ -728,9 +728,9 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C,
else if ( Xc.IsNormal(Yc,Precision::Angular())) {
myType = GeomAbs_Parabola;
Standard_Real F = Parab.Focal() / Xc.Magnitude();
gp_Parab Parab = gp_Parab( gp_Ax2(P,Xc^Yc,Xc), F);
gp_Parab aParab = gp_Parab( gp_Ax2(P,Xc^Yc,Xc), F);
Handle(Geom_Parabola) GeomParabolaPtr =
new Geom_Parabola(Parab) ;
new Geom_Parabola(aParab) ;
// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin
GeomAdaptor_Curve aGACurve(GeomParabolaPtr);
myResult = new GeomAdaptor_HCurve(aGACurve);
@@ -760,14 +760,14 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C,
gp_Vec Xc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.XDirection()));
gp_Vec Yc = ProjectVec(myPlane,myDirection,gp_Vec(AxeRef.YDirection()));
gp_Pnt P = ProjectPnt(myPlane,myDirection,AxeRef.Location());
Standard_Real R1 = Hypr.MajorRadius();
Standard_Real R2 = Hypr.MinorRadius();
Standard_Real aR1 = Hypr.MajorRadius();
Standard_Real aR2 = Hypr.MinorRadius();
gp_Dir Z = myPlane.Direction();
if ( Xc.Magnitude() < Precision::Confusion()) {
myType = GeomAbs_Hyperbola;
gp_Dir X = gp_Dir(Yc) ^ Z;
Hypr = gp_Hypr(gp_Ax2( P, Z, X), 0., R2 * Yc.Magnitude());
Hypr = gp_Hypr(gp_Ax2( P, Z, X), 0., aR2 * Yc.Magnitude());
GeomHyperbolaPtr =
new Geom_Hyperbola(Hypr) ;
// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin
@@ -778,7 +778,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C,
else if ( Yc.Magnitude() < Precision::Confusion()) {
myType = GeomAbs_Hyperbola;
Hypr =
gp_Hypr(gp_Ax2(P, Z, gp_Dir(Xc)), R1 * Xc.Magnitude(), 0.);
gp_Hypr(gp_Ax2(P, Z, gp_Dir(Xc)), aR1 * Xc.Magnitude(), 0.);
GeomHyperbolaPtr =
new Geom_Hyperbola(Hypr) ;
// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin
@@ -789,7 +789,7 @@ void ProjLib_ProjectOnPlane::Load(const Handle(Adaptor3d_HCurve)& C,
else if ( Xc.IsNormal(Yc,Precision::Angular())) {
myType = GeomAbs_Hyperbola;
Hypr = gp_Hypr( gp_Ax2( P, gp_Dir( Xc ^ Yc), gp_Dir( Xc)),
R1 * Xc.Magnitude(), R2 * Yc.Magnitude() );
aR1 * Xc.Magnitude(), aR2 * Yc.Magnitude() );
GeomHyperbolaPtr =
new Geom_Hyperbola(Hypr) ;
// Modified by Sergey KHROMOV - Tue Jan 29 16:57:29 2002 Begin