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

0030617: Coding - using reinterpret_cast instead of static_cast for downcast

Several reinterpret_cast have been replaced by static_cast when applicable.
This commit is contained in:
kgv
2020-08-28 15:18:43 +03:00
committed by bugmaster
parent d6c489212b
commit 7d47ebdbcd
5 changed files with 46 additions and 58 deletions

View File

@@ -145,8 +145,7 @@ Standard_Integer BOPAlgo_PaveFiller::MakeSDVertices
Standard_Integer nV;
if (nSD != -1) {
// update old SD vertex with new value
Handle(BRep_TVertex)& aTVertex =
reinterpret_cast<Handle(BRep_TVertex)&>(const_cast<Handle(TopoDS_TShape)&>(aVSD.TShape()));
BRep_TVertex* aTVertex = static_cast<BRep_TVertex*>(aVSD.TShape().get());
aTVertex->Pnt(BRep_Tool::Pnt(aVn));
aTVertex->Tolerance(BRep_Tool::Tolerance(aVn));
aVn = aVSD;

View File

@@ -3328,7 +3328,7 @@ void BOPAlgo_PaveFiller::CorrectToleranceOfSE()
Standard_Real aTolE = BRep_Tool::Tolerance(aE);
if (aTolC < aTolE) {
// reduce edge tolerance
reinterpret_cast<BRep_TEdge*>(aE.TShape().operator->())->Tolerance(aTolC);
static_cast<BRep_TEdge*>(aE.TShape().get())->Tolerance(aTolC);
bIsReduced = Standard_True;
}
}
@@ -3446,7 +3446,7 @@ void BOPAlgo_PaveFiller::CorrectToleranceOfSE()
}
//
if (aMaxTol < aTolV) {
reinterpret_cast<BRep_TVertex*>(aV.TShape().operator->())->Tolerance(aMaxTol);
static_cast<BRep_TVertex*>(aV.TShape().get())->Tolerance(aMaxTol);
}
}
}