mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024023: Revamp the OCCT Handle - gcc and clang
Adaptations for compiling with GCC 4.7 and 4.8: - Construction semantics is used for Handle objects being initialized by const Handle objects of derived type, to avoid overload resolution error in GCC 4.7. - Missing includes added. - Fixed bugs related to misuse of direct casts of handle. - Eliminate CLang warnings on uninitialized and unused variables, functions, and expressions
This commit is contained in:
@@ -65,9 +65,11 @@ StdSelect_TypeOfEdge StdSelect_EdgeFilter::Type() const
|
||||
//==================================================
|
||||
Standard_Boolean StdSelect_EdgeFilter::IsOk(const Handle(SelectMgr_EntityOwner)& EO) const
|
||||
{
|
||||
if (Handle(StdSelect_BRepOwner)::DownCast(EO).IsNull()) return Standard_False;
|
||||
|
||||
const TopoDS_Shape& sh = Handle(StdSelect_BRepOwner)::DownCast (EO)->Shape();
|
||||
Handle(StdSelect_BRepOwner) aBO (Handle(StdSelect_BRepOwner)::DownCast(EO));
|
||||
if (aBO.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
const TopoDS_Shape& sh = aBO->Shape();
|
||||
if(sh.ShapeType()!= TopAbs_EDGE) return Standard_False;
|
||||
|
||||
switch(mytype){
|
||||
|
@@ -53,9 +53,14 @@ StdSelect_TypeOfFace StdSelect_FaceFilter::Type() const
|
||||
Standard_Boolean StdSelect_FaceFilter::
|
||||
IsOk(const Handle(SelectMgr_EntityOwner)& EO) const
|
||||
{
|
||||
if (Handle(StdSelect_BRepOwner)::DownCast(EO).IsNull()) return Standard_False;
|
||||
const TopoDS_Shape& anobj= Handle(StdSelect_BRepOwner)::DownCast (EO)->Shape();
|
||||
if(anobj.ShapeType()!= TopAbs_FACE)return Standard_False;
|
||||
Handle(StdSelect_BRepOwner) aBO (Handle(StdSelect_BRepOwner)::DownCast(EO));
|
||||
if (aBO.IsNull())
|
||||
return Standard_False;
|
||||
|
||||
const TopoDS_Shape& anobj = aBO->Shape();
|
||||
if(anobj.ShapeType()!= TopAbs_FACE)
|
||||
return Standard_False;
|
||||
|
||||
switch(mytype) {
|
||||
case StdSelect_AnyFace:
|
||||
return Standard_True;
|
||||
|
Reference in New Issue
Block a user