0024023: Revamp the OCCT Handle -- downcast (automatic)
[occt.git] / src / TopOpeBRepBuild / TopOpeBRepBuild_makefaces.cxx
index 9aae462..c6a11b9 100644 (file)
@@ -573,7 +573,7 @@ void TopOpeBRepBuild_Builder::GFABUMakeFaces(const TopoDS_Shape& FF,TopOpeBRepBu
     Standard_Boolean istrim = ( T == STANDARD_TYPE(Geom_RectangularTrimmedSurface) );
     if (istrim) {
       Handle(Geom_RectangularTrimmedSurface) 
-       hrts=*((Handle(Geom_RectangularTrimmedSurface)*)&Surf);
+       hrts=Handle(Geom_RectangularTrimmedSurface)::DownCast (Surf);
       Standard_Real oumin,oumax,ovmin,ovmax;
       hrts->Bounds(oumin,oumax,ovmin,ovmax);
       Standard_Real umin,umax,vmin,vmax;