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

0025765: Coding rules - clean up code from obsolete macro checks

Unused code paths (including definition of these macros and meaningless comments) were eliminated.
This commit is contained in:
apn
2015-02-24 19:27:20 +03:00
committed by bugmaster
parent f1b0b4f9c6
commit d2094e110f
130 changed files with 11 additions and 1775 deletions

View File

@@ -14,9 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#define BUC60876 //GG_050401 Enable to highlight something
// with a specific hilight mode
#include <StdSelect_BRepOwner.ixx>
#include <SelectBasics_EntityOwner.hxx>
@@ -64,11 +61,7 @@ Standard_Boolean StdSelect_BRepOwner::
IsHilighted(const Handle(PrsMgr_PresentationManager)& PM,
const Standard_Integer aMode) const
{
#ifdef BUC60876
Standard_Integer M = (aMode < 0) ? myCurMode : aMode;
#else
Standard_Integer M = (myCurMode==-1) ? aMode:myCurMode;
#endif
if(myPrsSh.IsNull())
return PM->IsHighlighted(Selectable(),M);
return PM->IsHighlighted(myPrsSh,M);
@@ -82,11 +75,7 @@ void StdSelect_BRepOwner::Hilight(const Handle(PrsMgr_PresentationManager)& PM,
const Standard_Integer aMode)
{
#ifdef BUC60876
Standard_Integer M = (aMode < 0) ? myCurMode : aMode;
#else
Standard_Integer M = (myCurMode==-1) ? aMode:myCurMode;
#endif
Handle(SelectMgr_SelectableObject) aSel = Selectable();
if (myFromDecomposition)
{
@@ -129,11 +118,7 @@ void StdSelect_BRepOwner::HilightWithColor(const Handle(PrsMgr_PresentationManag
const Quantity_NameOfColor aCol,
const Standard_Integer aMode)
{
#ifdef BUC60876
Standard_Integer M = (aMode < 0) ? myCurMode : aMode;
#else
Standard_Integer M = (myCurMode==-1) ? aMode:myCurMode;
#endif
Handle(SelectMgr_SelectableObject) aSel = Selectable();
if (myFromDecomposition)
{
@@ -178,11 +163,7 @@ void StdSelect_BRepOwner::HilightWithColor(const Handle(PrsMgr_PresentationManag
void StdSelect_BRepOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& PM,
const Standard_Integer aMode)
{
#ifdef BUC60876
Standard_Integer M = (aMode < 0) ? myCurMode : aMode;
#else
Standard_Integer M = (myCurMode==-1) ? aMode:myCurMode;
#endif
if(myPrsSh.IsNull() || !myFromDecomposition)
PM->Unhighlight(Selectable(),M);
else
@@ -192,11 +173,7 @@ void StdSelect_BRepOwner::Unhilight(const Handle(PrsMgr_PresentationManager)& PM
void StdSelect_BRepOwner::Clear(const Handle(PrsMgr_PresentationManager)& PM,
const Standard_Integer aMode)
{
#ifdef BUC60876
Standard_Integer M = (aMode < 0) ? myCurMode : aMode;
#else
Standard_Integer M = (myCurMode==-1) ? aMode:myCurMode;
#endif
if (!myPrsSh.IsNull())
PM->Clear(myPrsSh,M);
myPrsSh.Nullify();

View File

@@ -14,9 +14,6 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#define BUC60576 //GG_5/10/99 Adds Cone to enum TypeOfFace
#include <StdSelect_FaceFilter.ixx>
#include <BRepAdaptor_Surface.hxx>
#include <TopoDS_Face.hxx>
@@ -72,20 +69,12 @@ IsOk(const Handle(SelectMgr_EntityOwner)& EO) const
case StdSelect_Sphere:
{
BRepAdaptor_Surface surf(TopoDS::Face(anobj));
#ifdef BUC60576
return (surf.GetType() == GeomAbs_Sphere);
#else
return (surf.GetType() == GeomAbs_Cone);
#endif
}
case StdSelect_Torus:
{
BRepAdaptor_Surface surf(TopoDS::Face(anobj));
#ifdef BUC60576
return ( surf.GetType() == GeomAbs_Torus);
#else
return ( surf.GetType() == GeomAbs_Plane || surf.GetType() == GeomAbs_Cone);
#endif
}
case StdSelect_Revol:
{
@@ -93,20 +82,16 @@ IsOk(const Handle(SelectMgr_EntityOwner)& EO) const
return ( surf.GetType() == GeomAbs_Cylinder ||
surf.GetType() == GeomAbs_Cone ||
surf.GetType() == GeomAbs_Torus
#ifdef BUC60576
||
surf.GetType() == GeomAbs_Sphere ||
surf.GetType() == GeomAbs_SurfaceOfRevolution
#endif
);
}
#ifdef BUC60576
case StdSelect_Cone: // waiting for the free cdl, it is used for Cone
{
BRepAdaptor_Surface surf(TopoDS::Face(anobj));
return (surf.GetType() == GeomAbs_Cone);
}
#endif
}
return Standard_False;
}