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

0023604: Uninitialized variables in debug mode

Removed #ifndef DEB ... #else ... #endif directives where the variables were being initialized only in release mode.
Removed unused part of code.
This commit is contained in:
abv
2012-12-10 16:53:05 +04:00
committed by omy
parent bd92cc2a59
commit 7a06c690fb
81 changed files with 17 additions and 617 deletions

View File

@@ -451,9 +451,7 @@ GeomAbs_Shape Bisector_BisecCC::Continuity() const
case GeomAbs_C2 : return GeomAbs_C1;
case GeomAbs_C3 : return GeomAbs_C2;
case GeomAbs_CN : return GeomAbs_CN;
#ifndef DEB
default: break;
#endif
}
return GeomAbs_C0;
}
@@ -497,9 +495,7 @@ GeomAbs_Shape Bisector_BisecCC::IntervalContinuity() const
case GeomAbs_C2 : return GeomAbs_C1;
case GeomAbs_C3 : return GeomAbs_C2;
case GeomAbs_CN : return GeomAbs_CN;
#ifndef DEB
default: break;
#endif
}
return GeomAbs_C0;
}
@@ -1125,11 +1121,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U,
Bisector_PointOnBis PRef;
gp_Pnt2d P,P1,P2,PBis;
gp_Vec2d T1,Tang;
#ifndef DEB
Standard_Real dU = 0.;
#else
Standard_Real dU;
#endif
Standard_Boolean ExtensionTangent = Standard_False;
if (myPolygon.Length() == 0) {
@@ -1633,12 +1625,8 @@ Standard_Real Bisector_BisecCC::SearchBound (const Standard_Real U1,
//=============================================================================
static Standard_Real ProjOnCurve (const gp_Pnt2d& P,
const Handle(Geom2d_Curve)& C)
{
#ifndef DEB
{
Standard_Real UOnCurve =0.;
#else
Standard_Real UOnCurve;
#endif
gp_Pnt2d PF,PL;
gp_Vec2d TF,TL;

View File

@@ -240,9 +240,7 @@ GeomAbs_Shape Bisector_BisecPC::Continuity() const
case GeomAbs_C2 : return GeomAbs_C1;
case GeomAbs_C3 : return GeomAbs_C2;
case GeomAbs_CN : return GeomAbs_CN;
#ifndef DEB
default: break;
#endif
}
return GeomAbs_C0;
}
@@ -286,9 +284,7 @@ GeomAbs_Shape Bisector_BisecPC::IntervalContinuity() const
case GeomAbs_C2 : return GeomAbs_C1;
case GeomAbs_C3 : return GeomAbs_C2;
case GeomAbs_CN : return GeomAbs_CN;
#ifndef DEB
default: break;
#endif
}
return GeomAbs_C0;
}
@@ -605,11 +601,7 @@ Standard_Real Bisector_BisecPC::SearchBound (const Standard_Real U1,
const Standard_Real U2) const
{
Standard_Real Dist1,Dist2,DistMid,U11,U22;
#ifndef DEB
Standard_Real UMid = 0.;
#else
Standard_Real UMid;
#endif
Standard_Real Tol = Precision::PConfusion();
Standard_Real DistMax2 = distMax*distMax;
U11 = U1; U22 = U2;
@@ -646,11 +638,7 @@ void Bisector_BisecPC::CuspFilter()
//=============================================================================
void Bisector_BisecPC::ComputeIntervals ()
{
#ifndef DEB
Standard_Real U1 =0.,U2 =0.,UProj =0.;
#else
Standard_Real U1,U2,UProj;
#endif
Standard_Real UStart,UEnd;
Standard_Real Dist1,Dist2,DistProj;
isEmpty = Standard_False;
@@ -787,11 +775,7 @@ Standard_Real Bisector_BisecPC::Parameter(const gp_Pnt2d& P) const
return U + endIntervals.Value(bisInterval);
}
}
#ifndef DEB
Standard_Real UOnCurve = 0.;
#else
Standard_Real UOnCurve;
#endif
Geom2dAPI_ProjectPointOnCurve Proj(P,curve,
curve->FirstParameter(),curve->LastParameter());
if (Proj.NbPoints() > 0) {

View File

@@ -329,11 +329,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1,
const Standard_Real Tol)
{
Standard_Real USol,U1,U2,Dist;
#ifndef DEB
Standard_Real UMin =0.,UMax =0.;
#else
Standard_Real UMin,UMax;
#endif
Standard_Real Eps = Precision::PConfusion();
gp_Pnt2d PSol;