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

0024510: Remove unused local variables

When warnings are enabled, compilers report lots of occurrences
of unused local variables, which makes it harder to find other
meaningful warnings.
This commit does not fix all unused local variables.

Fix new type conversion warning

Code cleaned to avoid MSVC compiler warnings on unused function arguments.
Several useless pieces of code are removed.
Changes in IntTools_EdgeFace.cxx, Blend_Walking_1.gxx, Bnd_BoundSortBox.cxx, ProjLib_ProjectedCurve.cxx are reverted (separated to specific issue for more in-depth analysis).
This commit is contained in:
Denis Barbier
2014-01-09 12:20:06 +04:00
committed by bugmaster
parent b467a87036
commit 96a95605cd
230 changed files with 455 additions and 1286 deletions

View File

@@ -216,13 +216,6 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
Standard_Real Tl=(TheTol < TOL_MINI)? TOL_MINI : TheTol;
Standard_Real TlConf=(TheTolConf < TOL_CONF_MINI)? TOL_CONF_MINI : TheTolConf;
Perform(C1,D1,TlConf,Tl,0,DU,DU);
//----------------------------------------------------------------------
//-- Traitement des points en bouts
//----------------------------------------------------------------------
Standard_Boolean HeadOn1 = Standard_False;
Standard_Boolean HeadOn2 = Standard_False;
Standard_Boolean EndOn1 = Standard_False;
Standard_Boolean EndOn2 = Standard_False;
Standard_Integer i;
Standard_Integer n=this->NbPoints();
@@ -240,12 +233,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
for(i=1;i<=n;i++) {
IntRes2d_Position Pos1 = this->Point(i).TransitionOfFirst().PositionOnCurve();
if(Pos1 == IntRes2d_Head) HeadOn1 = Standard_True;
else if(Pos1 == IntRes2d_End) EndOn1 = Standard_True;
IntRes2d_Position Pos2 = this->Point(i).TransitionOfSecond().PositionOnCurve();
if(Pos2 == IntRes2d_Head) HeadOn2 = Standard_True;
else if(Pos2 == IntRes2d_End) EndOn2 = Standard_True;
if(Pos1 == IntRes2d_Head) {
if(Pos2 == IntRes2d_Head) PosSegment|=1;
@@ -260,12 +248,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
n=this->NbSegments();
for(i=1;i<=n;i++) {
IntRes2d_Position Pos1 = this->Segment(i).FirstPoint().TransitionOfFirst().PositionOnCurve();
if(Pos1 == IntRes2d_Head) HeadOn1 = Standard_True;
else if(Pos1 == IntRes2d_End) EndOn1 = Standard_True;
IntRes2d_Position Pos2 = this->Segment(i).FirstPoint().TransitionOfSecond().PositionOnCurve();
if(Pos2 == IntRes2d_Head) HeadOn2 = Standard_True;
else if(Pos2 == IntRes2d_End) EndOn2 = Standard_True;
if(Pos1 == IntRes2d_Head) {
if(Pos2 == IntRes2d_Head) PosSegment|=1;
@@ -277,12 +260,7 @@ void IntCurve_IntPolyPolyGen::Perform( const TheCurve& C1
}
Pos1 = this->Segment(i).LastPoint().TransitionOfFirst().PositionOnCurve();
if(Pos1 == IntRes2d_Head) HeadOn1 = Standard_True;
else if(Pos1 == IntRes2d_End) EndOn1 = Standard_True;
Pos2 = this->Segment(i).LastPoint().TransitionOfSecond().PositionOnCurve();
if(Pos2 == IntRes2d_Head) HeadOn2 = Standard_True;
else if(Pos2 == IntRes2d_End) EndOn2 = Standard_True;
if(Pos1 == IntRes2d_Head) {
if(Pos2 == IntRes2d_Head) PosSegment|=1;

View File

@@ -318,20 +318,9 @@ void IntCurve_Polygon2dGen::ComputeWithBox(const TheCurve& C,
TheParams.SetValue(MaxIndexUsed,u);
Standard_Real u1m = 0.5*(u+TheParams.Value(TheIndex.Value(i-1)));
Standard_Real um2 = 0.5*(u+TheParams.Value(TheIndex.Value(i+1)));
gp_Pnt2d P1m = TheCurveTool::Value(C,u1m);
#ifdef DEB
gp_Pnt2d Pm2 = TheCurveTool::Value(C,um2);
#else
TheCurveTool::Value(C,um2);
#endif
gp_Lin2d L1m(P1,gp_Dir2d(gp_Vec2d(P1,Pm)));
#ifdef DEB
gp_Lin2d Lm2(Pm,gp_Dir2d(gp_Vec2d(Pm,ThePnts.Value(TheIndex.Value(i+1)))));
#else
ThePnts.Value(TheIndex.Value(i+1));
#endif
t = L1m.Distance(P1m);
gp_Lin2d L1m(P1,gp_Dir2d(gp_Vec2d(P1,Pm)));
t = L1m.Distance(P1m);
i--;
}
}