1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024023: Revamp the OCCT Handle -- downcast (automatic)

Automatic update by command "occt_upgrade . -downcast"

C-style cast of Handle to that of derived type (now illegal) is replaced by call to DownCast()
Const reference local variables of Handle type initialized by result of DownCast are replaced by normal variables.
This commit is contained in:
abv
2015-07-02 16:41:05 +03:00
parent ce8b059af3
commit c5f3a42524
158 changed files with 863 additions and 888 deletions

View File

@@ -793,7 +793,7 @@ Handle(Geom2d_Curve) BRep_Tool_CurveOnSurface
while (itcr.More()) {
const Handle(BRep_CurveRepresentation)& cr = itcr.Value();
if (cr->IsCurveOnSurface(S,loc)) {
const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (cr));
GC->Range(First,Last);
if (GC->IsCurveOnClosedSurface() && Eisreversed)
return GC->PCurve2();
@@ -837,7 +837,7 @@ Handle(Geom2d_Curve) BRep_Tool_CurveOnSurface
if (!LC.IsIdentity()) {
const gp_Trsf& T = LC.Transformation();
Handle(Geom_Geometry) GPT = GP->Transformed(T);
Plane = *((Handle(Geom_Plane)*)&GPT);
Plane = Handle(Geom_Plane)::DownCast (GPT);
}
GeomAdaptor_Surface& GAS = HS->ChangeSurface();
GAS.Load(Plane);
@@ -856,7 +856,7 @@ Handle(Geom2d_Curve) BRep_Tool_CurveOnSurface
if (pc->DynamicType() == STANDARD_TYPE(Geom2d_TrimmedCurve)) {
Handle(Geom2d_TrimmedCurve) TC =
(*((Handle(Geom2d_TrimmedCurve)*)&pc));
Handle(Geom2d_TrimmedCurve)::DownCast (pc);
pc = TC->BasisCurve();
}
First = f; Last = l;