1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +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

@@ -309,13 +309,8 @@ Standard_Boolean BRepBlend_RstRstLineBuilder::PerformFirstSection
Standard_Boolean recadp1, recadp2, recadrst1, recadrst2;
Standard_Real wp1, wp2, wrst1, wrst2;
#ifndef DEB
Blend_Status State = Blend_OnRst12;
Standard_Real trst11 = 0., trst12 = 0., trst21 = 0., trst22 = 0.;
#else
Blend_Status State;
Standard_Real trst11, trst12, trst21, trst22;
#endif
math_Vector infbound(1, 2), supbound(1, 2), tolerance(1, 2);
math_Vector solinvp1(1, 2), solinvp2(1, 2), solinvrst1(1, 3), solinvrst2(1, 3);
Handle(Adaptor3d_HVertex) Vtxp1, Vtxp2, Vtxrst1, Vtxrst2, Vtxc;
@@ -555,13 +550,8 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func,
if (sens* (parprec - Bound) >= -tolgui) {
return;
}
#ifndef DEB
Blend_Status State = Blend_OnRst12;
Standard_Real trst11 = 0., trst12 = 0., trst21 = 0., trst22 = 0.;
#else
Blend_Status State;
Standard_Real trst11, trst12, trst21, trst22;
#endif
TopAbs_State situonc1, situonc2;
Blend_DecrochStatus decroch;
Standard_Boolean Arrive, recadp1, recadp2, recadrst1, recadrst2, echecrecad;
@@ -996,10 +986,8 @@ void BRepBlend_RstRstLineBuilder::InternalPerform(Blend_RstRstFunction& Func,
Arrive = Standard_True;
}
break;
#ifndef DEB
default:
break;
#endif
}
if (Arrive) {
if (sens > 0.) {
@@ -1390,11 +1378,7 @@ void BRepBlend_RstRstLineBuilder::MakeExtremity(BRepBlend_Extremity&
else {
Extrem.SetVertex(Vtx);
while (Iter->More()) {
//#ifndef DEB
Handle(Adaptor2d_HCurve2d) arc = Iter->Value();
//#else
// Handle(Adaptor2d_HCurve2d)& arc = Iter->Value();
//#endif
if (arc != Arc) {
Iter->Initialize(arc);
Iter->InitVertexIterator();
@@ -1442,11 +1426,7 @@ Blend_Status BRepBlend_RstRstLineBuilder::CheckDeflectionOnRst1(const Blend_Poin
prevTg = previousP.TangentOnC1();
}
Standard_Real Norme, curNorme;
#ifndef DEB
Standard_Real prevNorme = 0.;
#else
Standard_Real prevNorme;
#endif
gp_Vec Corde(prevP, Psurf);
Norme = Corde.SquareMagnitude();
if (!curpointistangent) curNorme = Tgsurf.SquareMagnitude();
@@ -1524,11 +1504,7 @@ Blend_Status BRepBlend_RstRstLineBuilder::CheckDeflectionOnRst2(const Blend_Poin
prevTg = previousP.TangentOnC2();
}
Standard_Real Norme, curNorme;
#ifndef DEB
Standard_Real prevNorme = 0.;
#else
Standard_Real prevNorme;
#endif
gp_Vec Corde(prevP, Psurf);
Norme = Corde.SquareMagnitude();
if (!curpointistangent) curNorme = Tgsurf.SquareMagnitude();
@@ -1598,11 +1574,7 @@ Blend_Status BRepBlend_RstRstLineBuilder::TestArret(Blend_RstRstFunction& Func,
gp_Vec tgrst1, tgrst2;
gp_Vec2d tg2drst1, tg2drst2;
Blend_Status StateRst1, StateRst2;
#ifndef DEB
IntSurf_TypeTrans trarst1 = IntSurf_Undecided, trarst2 = IntSurf_Undecided;
#else
IntSurf_TypeTrans trarst1, trarst2;
#endif
Blend_Point curpoint;
if (Func.IsSolution(sol, tolesp)) {

View File

@@ -340,13 +340,8 @@ Standard_Boolean BRepBlend_SurfRstLineBuilder::PerformFirstSection
else {
sens = -1.;
}
#ifndef DEB
Blend_Status State = Blend_OnRst12;
Standard_Real trst = 0.;
#else
Blend_Status State;
Standard_Real trst;
#endif
Standard_Boolean recadp,recadrst,recads;
Standard_Real wp,wrst,ws;
Standard_Real U,V;
@@ -515,21 +510,13 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func,
if (sens*(parprec - Bound) >= -tolgui) {
return;
}
#ifndef DEB
Blend_Status State = Blend_OnRst12;
#else
Blend_Status State;
#endif
TopAbs_State situonc,situons;
Standard_Boolean decroch;
Standard_Boolean Arrive,recadp,recadrst,recads,echecrecad;
Standard_Real wp,wrst,ws;
Standard_Real U,V;
#ifndef DEB
Standard_Real trst = 0.;
#else
Standard_Real trst;
#endif
math_Vector infbound(1,3),supbound(1,3);
math_Vector parinit(1,3),tolerance(1,3);
math_Vector solinvp(1,3),solinvrst(1,4),solinvs(1,3);
@@ -894,10 +881,8 @@ void BRepBlend_SurfRstLineBuilder::InternalPerform(Blend_SurfRstFunction& Func,
Arrive = Standard_True;
}
break;
#ifndef DEB
default:
break;
#endif
}
if (Arrive) {
if (sens > 0.) {
@@ -1265,11 +1250,7 @@ void BRepBlend_SurfRstLineBuilder::MakeExtremity(BRepBlend_Extremity&
else {
Extrem.SetVertex(Vtx);
while (Iter->More()) {
//#ifndef DEB
Handle(Adaptor2d_HCurve2d) arc = Iter->Value();
//#else
// Handle(Adaptor2d_HCurve2d)& arc = Iter->Value();
//#endif
if (arc != Arc) {
Iter->Initialize(arc);
Iter->InitVertexIterator();
@@ -1316,11 +1297,7 @@ Blend_Status BRepBlend_SurfRstLineBuilder::CheckDeflectionOnSurf(const Blend_Poi
if(!prevpointistangent){
prevTg = previousP.TangentOnS();
}
#ifndef DEB
Standard_Real Norme,prevNorme = 0.;
#else
Standard_Real Norme,prevNorme;
#endif
gp_Vec Corde(prevP,Psurf);
Norme = Corde.SquareMagnitude();
// if(!curpointistangent) curNorme = Tgsurf.SquareMagnitude();
@@ -1396,11 +1373,7 @@ Blend_Status BRepBlend_SurfRstLineBuilder::CheckDeflectionOnRst(const Blend_Poin
if(!prevpointistangent){
prevTg = previousP.TangentOnC();
}
#ifndef DEB
Standard_Real Norme,prevNorme = 0.;
#else
Standard_Real Norme,prevNorme;
#endif
gp_Vec Corde(prevP,Psurf);
Norme = Corde.SquareMagnitude();
// if(!curpointistangent) curNorme = Tgsurf.SquareMagnitude();
@@ -1470,11 +1443,7 @@ Blend_Status BRepBlend_SurfRstLineBuilder::TestArret(Blend_SurfRstFunction& Func
gp_Vec tgs,tgrst;
gp_Vec2d tg2ds,tg2drst;
Blend_Status StateS,StateRst;
#ifndef DEB
IntSurf_TypeTrans tras = IntSurf_Undecided, trarst = IntSurf_Undecided;
#else
IntSurf_TypeTrans tras,trarst;
#endif
Blend_Point curpoint;
if (Func.IsSolution(sol,tolesp)) {