mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -260,7 +260,7 @@ static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E,
|
||||
while (itcr.More()) {
|
||||
Handle(BRep_CurveRepresentation)& cr = itcr.Value();
|
||||
if (cr->IsCurveOnSurface(S,l)) {
|
||||
Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&cr);
|
||||
Handle(BRep_GCurve)& GC = Handle(BRep_GCurve)::DownCast (cr);
|
||||
if (GC->IsCurveOnClosedSurface() && Eisreversed)
|
||||
return GC->PCurve2();
|
||||
else
|
||||
@@ -3379,7 +3379,7 @@ void BRepFill_Sweep::RebuildTopOrBottomEdge(const TopoDS_Edge& aNewEdge,
|
||||
const Handle(BRep_CurveRepresentation)& CurveRep = itrep.Value();
|
||||
if (CurveRep->IsCurveOnSurface())
|
||||
{
|
||||
const Handle(BRep_GCurve)& GC = *((Handle(BRep_GCurve)*)&CurveRep);
|
||||
Handle(BRep_GCurve) GC (Handle(BRep_GCurve)::DownCast (CurveRep));
|
||||
Handle(Geom2d_Curve) aPCurve = GC->PCurve();
|
||||
Handle(Geom_Surface) aSurf = GC->Surface();
|
||||
TopLoc_Location aLoc = aNewEdge.Location() * GC->Location();
|
||||
|
Reference in New Issue
Block a user