mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +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:
@@ -796,11 +796,9 @@ void BRepOffset_Tool::PipeInter(const TopoDS_Face& F1,
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Boolean IsAutonomVertex(const TopoDS_Shape& aVertex,
|
||||
const TopoDS_Shape& F1,
|
||||
const TopoDS_Shape& F2,
|
||||
const BOPDS_PDS& pDS)
|
||||
const BOPDS_PDS& pDS)
|
||||
{
|
||||
Standard_Integer index, indF1, indF2;
|
||||
Standard_Integer index;
|
||||
Standard_Integer aNbVVs, aNbEEs, aNbEFs, aInt;
|
||||
//
|
||||
index = pDS->Index(aVertex);
|
||||
@@ -817,9 +815,6 @@ static Standard_Boolean IsAutonomVertex(const TopoDS_Shape& aVertex,
|
||||
}
|
||||
}
|
||||
//
|
||||
indF1 = pDS->Index(F1);
|
||||
indF2 = pDS->Index(F2);
|
||||
//
|
||||
if (!pDS->IsNewShape(index)) {
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -870,9 +865,7 @@ static Standard_Boolean IsAutonomVertex(const TopoDS_Shape& aVertex,
|
||||
|
||||
static Standard_Boolean AreConnex(const TopoDS_Wire& W1,
|
||||
const TopoDS_Wire& W2,
|
||||
const TopoDS_Shape& F1,
|
||||
const TopoDS_Shape& F2,
|
||||
const BOPDS_PDS& pDS)
|
||||
const BOPDS_PDS& pDS)
|
||||
{
|
||||
TopoDS_Vertex V11, V12, V21, V22;
|
||||
TopExp::Vertices( W1, V11, V12 );
|
||||
@@ -883,14 +876,14 @@ static Standard_Boolean AreConnex(const TopoDS_Wire& W1,
|
||||
{
|
||||
Standard_Boolean isCV1 = V11.IsSame(V21) || V11.IsSame(V22);
|
||||
Standard_Boolean isCV2 = V12.IsSame(V21) || V12.IsSame(V22);
|
||||
if (isCV1 && !IsAutonomVertex(V11, F1, F2, pDS))
|
||||
if (isCV1 && !IsAutonomVertex(V11, pDS))
|
||||
{
|
||||
if (!isCV2)
|
||||
return Standard_False;
|
||||
if (!IsAutonomVertex(V12, F1, F2, pDS))
|
||||
if (!IsAutonomVertex(V12, pDS))
|
||||
return Standard_False;
|
||||
}
|
||||
if (!isCV1 && !IsAutonomVertex(V12, F1, F2, pDS))
|
||||
if (!isCV1 && !IsAutonomVertex(V12, pDS))
|
||||
return Standard_False;
|
||||
|
||||
TopoDS_Vertex CV = (V11.IsSame(V21) || V11.IsSame(V22))? V11 : V12;
|
||||
@@ -1516,7 +1509,7 @@ static TopoDS_Edge AssembleEdge(const BOPDS_PDS& pDS,
|
||||
{
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices( CurEdge, V1, V2 );
|
||||
if (IsAutonomVertex( V1, F1, F2, pDS ))
|
||||
if (IsAutonomVertex( V1, pDS ))
|
||||
{
|
||||
After = Standard_False;
|
||||
Vfirst = Vlast = V2;
|
||||
@@ -1759,7 +1752,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
|
||||
for (k = 1; k <= wseq.Length(); k++)
|
||||
{
|
||||
resWire = TopoDS::Wire(wseq(k));
|
||||
if (AreConnex( resWire, aWire, cpF1, cpF2, pDS ))
|
||||
if (AreConnex( resWire, aWire, pDS ))
|
||||
{
|
||||
Candidates.Append( 1 );
|
||||
break;
|
||||
@@ -1778,7 +1771,7 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
|
||||
//if (anEdge.IsSame(edges(Candidates.First())))
|
||||
//continue;
|
||||
aWire = BRepLib_MakeWire( anEdge );
|
||||
if (AreConnex( resWire, aWire, cpF1, cpF2, pDS ))
|
||||
if (AreConnex( resWire, aWire, pDS ))
|
||||
Candidates.Append( j );
|
||||
}
|
||||
Standard_Integer minind = 1;
|
||||
@@ -1823,13 +1816,13 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1,
|
||||
{
|
||||
TopoDS_Vertex V1, V2;
|
||||
TopExp::Vertices( anEdge, V1, V2 );
|
||||
if (!IsAutonomVertex( V1, cpF1, cpF2, pDS ))
|
||||
if (!IsAutonomVertex( V1, pDS ))
|
||||
{
|
||||
StartVertex = V2;
|
||||
StartEdge = anEdge;
|
||||
StartFound = Standard_True;
|
||||
}
|
||||
else if (!IsAutonomVertex( V2, cpF1, cpF2, pDS ))
|
||||
else if (!IsAutonomVertex( V2, pDS ))
|
||||
{
|
||||
StartVertex = V1;
|
||||
StartEdge = anEdge;
|
||||
|
Reference in New Issue
Block a user