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

@@ -529,7 +529,7 @@ Standard_Real BRepCheck_Edge::Tolerance()
Standard_Real dist2, tol2, tolCal=0., prm;
gp_Pnt center, othP;
Standard_Integer i, imax;
Standard_Integer i;
for (i= 0; i< NCONTROL; i++) {
prm = ((NCONTROL-1-i)*First + i*Last)/(NCONTROL-1);
tol2=dist2=0.;
@@ -541,7 +541,6 @@ Standard_Real BRepCheck_Edge::Tolerance()
}
if (tol2>tolCal) {
tolCal=tol2;
imax=i;
}
}
// On prend 5% de marge car au dessus on crontrole severement

View File

@@ -938,7 +938,6 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
{
Standard_Boolean ok;
Standard_Integer i,j,Nbedges;
Standard_Real first1,last1,first2,last2, tolint;
gp_Pnt2d pfirst1,plast1,pfirst2,plast2;
@@ -950,7 +949,6 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
TopTools_IndexedMapOfOrientedShape EMap;
TopTools_MapOfOrientedShape auxmape;
//
ok=Standard_True;
//-- check with proper tolerances if there is no
//-- point in the tolerance of a vertex.
tolint = 1.e-10;
@@ -1057,7 +1055,6 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
}
}
if(localok==Standard_False) {
ok=0;
retE1=E1;
if (Update) {
BRepCheck::Add(myMap(myShape),BRepCheck_SelfIntersectingWire);
@@ -1223,23 +1220,20 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
cout << "\n--- BRepCheck Wire: AutoIntersection Phase1 -> Erreur \n" <<endl;
#endif
Standard_Boolean yaunvtxproche;
Standard_Real distauvtxleplusproche,VParaOnEdge1,VParaOnEdge2;
gp_Pnt VertexLePlusProche;
//
yaunvtxproche=Standard_False;
VParaOnEdge1 =0.;
VParaOnEdge2 =0.;
distauvtxleplusproche=RealLast();
//Find the nearest common vertex
itl.Initialize( CommonVertices );
for (; itl.More(); itl.Next()) {
Standard_Real tolvtt, disptvtx;
Standard_Real disptvtx;
gp_Pnt p3dvtt;
//
const TopoDS_Vertex& vtt = TopoDS::Vertex(itl.Value());
p3dvtt = BRep_Tool::Pnt(vtt);
tolvtt = BRep_Tool::Tolerance(vtt);
disptvtx = P3d.Distance(p3dvtt);
if (disptvtx < distauvtxleplusproche) {
VertexLePlusProche = p3dvtt;
@@ -1346,7 +1340,6 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
} //end of if (localok == Standard_False && !CommonVertices.IsEmpty())
//
if(localok==Standard_False) {
ok=0;
retE1=E1;
retE2=E2;
if (Update) {
@@ -1481,7 +1474,6 @@ BRepCheck_Status BRepCheck_Wire::SelfIntersect(const TopoDS_Face& F,
} //end of for (k = 0; k < 2; k++)
//
if(localok==Standard_False) {
ok=0;
retE1=E1;
retE2=E2;
if (Update) {