1
0
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:
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

@@ -249,7 +249,7 @@ void BOPAlgo_BuilderSolid::PerformLoops()
//
myLoops.Clear();
//
Standard_Integer aNbLF, aNbOff, aNbFP, aNbFA;
Standard_Integer aNbLF, aNbOff, aNbFP;
Standard_Integer i;
TopAbs_Orientation anOr;
TopoDS_Edge aEL;
@@ -419,8 +419,6 @@ void BOPAlgo_BuilderSolid::PerformLoops()
aEFMap.Clear();
AddedFacesMap.Clear();
//
aNbFA=myShapesToAvoid.Extent();
//
aItM.Initialize(myShapesToAvoid);
for (; aItM.More(); aItM.Next()) {
const TopoDS_Shape& aFF=aItM.Key();

View File

@@ -49,15 +49,15 @@ class BOPAlgo_BuilderFaceFunctor {
: myPVBF(&aVBF) {
}
//
void operator()( const flexible_range<Standard_Size>& aBR ) const{
Standard_Size i, iBeg, iEnd;
void operator()( const flexible_range<Standard_Integer>& aBR ) const{
Standard_Integer i, iBeg, iEnd;
//
BOPAlgo_VectorOfBuilderFace& aVBF=*myPVBF;
//
iBeg=aBR.begin();
iEnd=aBR.end();
for(i=iBeg; i!=iEnd; ++i) {
BOPAlgo_BuilderFace& aBF=aVBF((Standard_Integer)i);
BOPAlgo_BuilderFace& aBF=aVBF(i);
//
aBF.Perform();
}
@@ -76,13 +76,13 @@ class BOPAlgo_BuilderFaceCnt {
BOPAlgo_VectorOfBuilderFace& aVBF) {
//
BOPAlgo_BuilderFaceFunctor aBFF(aVBF);
Standard_Size aNbBF=aVBF.Extent();
Standard_Integer aNbBF=aVBF.Extent();
//
if (bRunParallel) {
flexible_for(flexible_range<Standard_Size>(0,aNbBF), aBFF);
flexible_for(flexible_range<Standard_Integer>(0,aNbBF), aBFF);
}
else {
aBFF.operator()(flexible_range<Standard_Size>(0,aNbBF));
aBFF.operator()(flexible_range<Standard_Integer>(0,aNbBF));
}
}
//
@@ -236,7 +236,7 @@ class BOPAlgo_BuilderSolidCnt {
Standard_EXPORT static void Perform(const Standard_Boolean bRunParallel,
BOPAlgo_VectorOfBuilderSolid& aVBS) {
Standard_Size aNbBS=aVBS.Extent();
Standard_Integer aNbBS=aVBS.Extent();
BOPAlgo_BuilderSolidFunctor aBSF(aVBS);
//
if (bRunParallel) {

View File

@@ -470,7 +470,7 @@ void BOPAlgo_Builder::BuildSplitSolids(BOPCol_DataMapOfShapeListOfShape& theInPa
myErrorStatus=0;
//
Standard_Boolean bFlagSD;
Standard_Integer i, aNbS, aNbSFS;//, iErr
Standard_Integer i, aNbS;
TopExp_Explorer aExp;
BOPCol_ListIteratorOfListOfShape aIt;
BOPCol_DataMapIteratorOfDataMapOfShapeShape aIt1;
@@ -542,8 +542,6 @@ void BOPAlgo_Builder::BuildSplitSolids(BOPCol_DataMapOfShapeListOfShape& theInPa
aSFS.Append(aF);
}
//
aNbSFS=aSFS.Extent();
//
// 1.3 Build new solids
Handle(NCollection_IncAllocator) aAlr1;
aAlr1=new NCollection_IncAllocator();
@@ -600,7 +598,7 @@ void BOPAlgo_Builder::FillInternalShapes()
{
myErrorStatus=0;
//
Standard_Integer i, j, aNbS, aNbSI, aNbSx, aNbSd;
Standard_Integer i, j, aNbS, aNbSI, aNbSx;
TopAbs_ShapeEnum aType;
TopAbs_State aState;
TopoDS_Iterator aItS;
@@ -731,8 +729,6 @@ void BOPAlgo_Builder::FillInternalShapes()
}
}// for (i=0; i<aNbS; ++i) {
//
aNbSd=aLSd.Extent();
//
// 3. Some shapes of aMSI can be already tied with faces of
// split solids
aItM.Initialize(aMSI);

View File

@@ -44,7 +44,7 @@
void BOPAlgo_PaveFiller::PerformVV()
{
Standard_Boolean bWithSubShape;
Standard_Integer n1, n2, iFlag, nX, n, aSize, i, aNbVV, j, iX, k, aNbBlocks;
Standard_Integer n1, n2, iFlag, nX, n, aSize, i, j, iX, k, aNbBlocks;
Handle(NCollection_IncAllocator) aAllocator;
BOPCol_DataMapIteratorOfDataMapOfIntegerListOfInteger aItMILI;
BOPCol_ListIteratorOfListOfInteger aItLI, aItLI2;
@@ -131,7 +131,6 @@
}
}
}
aNbVV=aVVs.Extent();
//
//-----------------------------------------------------scope t
aLV.Clear();

View File

@@ -271,7 +271,7 @@ void BOPAlgo_PaveFiller::MakeBlocks()
Standard_Boolean bExist, bValid2D;
Standard_Integer i, nF1, nF2, aNbC, aNbP, j;
Standard_Integer nV1, nV2;
Standard_Real aTolR3D, aTolR2D, aT1, aT2, aTol;
Standard_Real aTolR3D, aT1, aT2, aTol;
Handle(NCollection_IncAllocator) aAllocator;
BOPDS_ListIteratorOfListOfPaveBlock aItLPB;
TopoDS_Edge aES;
@@ -310,7 +310,6 @@ void BOPAlgo_PaveFiller::MakeBlocks()
const TopoDS_Face& aF2=(*(TopoDS_Face *)(&myDS->Shape(nF2)));
//
aTolR3D=aFF.TolR3D();
aTolR2D=aFF.TolR2D();
//
// Update face info
if (aMF.Add(nF1)) {

View File

@@ -72,7 +72,7 @@ static void UpdateVertices(const TopoDS_Edge& aE,
}
//
Standard_Boolean bCB, bV1, bV2;
Standard_Integer i, nE, nV1, nV2, nSp, aNbPB, nOrE;
Standard_Integer i, nE, nV1, nV2, nSp, aNbPB;
Standard_Real aT1, aT2;
Handle(NCollection_IncAllocator) aAllocator;
BOPDS_ListIteratorOfListOfPaveBlock aItPB, aItPBCB;
@@ -90,7 +90,6 @@ static void UpdateVertices(const TopoDS_Edge& aE,
//DEBf
if (aNbPB) {
aPBx=aLPB.First();
nOrE=aPBx->OriginalEdge();
}
//DEBt
if (aNbPB==1) {

View File

@@ -243,7 +243,7 @@ static
const BOPDS_ListOfPaveBlock& aLPBOut,
const Handle(BOPDS_PaveBlock)& aPBD)
{
Standard_Boolean bXDir, bIsDone, bReject;
Standard_Boolean bXDir, bIsDone;
Standard_Integer nE, aNbPoints, j;
Standard_Real aTD1, aTD2, aT1, aT2, aTolInter, aX, aDT;
Standard_Real aTolCmp;
@@ -329,7 +329,6 @@ static
continue;
}
//
bReject=Standard_False;
if (aPBD->ContainsParameter(aX, aDT)) {
continue;
}