1
0
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 (manual)

Manual corrections of C-style casts of Handle types
This commit is contained in:
abv
2015-07-02 16:44:46 +03:00
parent c5f3a42524
commit a1eb3afd0d
12 changed files with 54 additions and 85 deletions

View File

@@ -237,9 +237,6 @@ void AIS_SymmetricRelation::ComputeSelection(const Handle(SelectMgr_Selection)&
//=======================Pour les arcs======================
if(cu1.GetType() == GeomAbs_Circle) {
BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);
// Handle(Geom_Circle) geom_circ1 = (Handle(Geom_Circle)&) BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);
//JR/Hp
Handle(Geom_Curve) aGeomCurve = BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);
Handle(Geom_Circle) geom_circ1 = Handle(Geom_Circle)::DownCast (aGeomCurve) ;
// Handle(Geom_Circle) geom_circ1 = (const Handle(Geom_Circle)&) BRep_Tool::Curve(TopoDS::Edge(myFShape),F,L);

View File

@@ -25,10 +25,7 @@ Standard_Boolean AIS_TypeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& anObj
if(Handle(AIS_InteractiveObject)::DownCast(anObj->Selectable()).IsNull())
return Standard_False;
//#ifndef OCCT_DEBUG
Handle(SelectMgr_SelectableObject) aSelectableObject = anObj->Selectable() ;
return Handle(AIS_InteractiveObject)::DownCast (aSelectableObject)->Type()== myKind;
//#else
// return ((Handle(AIS_InteractiveObject)&)anObj->Selectable())->Type()== myKind;
//#endif
Handle(AIS_InteractiveObject) anObject =
Handle(AIS_InteractiveObject)::DownCast (anObj->Selectable());
return ! anObject.IsNull() && anObject->Type()== myKind;
}