mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0027067: Avoid use of virtual methods for implementation of destructors in legacy classes
Redundant methods Delete() and Desroy(), created in CDL as a hack to define destructor for the class, are removed; their definitions are converted to definition of destructors. In a couple of places methods Destroy() are preserved (bug made non-virtual) because they are called explicitly.
This commit is contained in:
@@ -55,7 +55,7 @@ myUNKNOWNRaise(Standard_False) // no raise if UNKNOWN state found
|
||||
InitAreaBuilder(LS,LC,ForceClass);
|
||||
}
|
||||
|
||||
void TopOpeBRepBuild_AreaBuilder::Delete()
|
||||
TopOpeBRepBuild_AreaBuilder::~TopOpeBRepBuild_AreaBuilder()
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -66,8 +66,7 @@ public:
|
||||
//! the shapes described by <LS> using the classifier <LC>.
|
||||
Standard_EXPORT TopOpeBRepBuild_AreaBuilder(TopOpeBRepBuild_LoopSet& LS, TopOpeBRepBuild_LoopClassifier& LC, const Standard_Boolean ForceClass = Standard_False);
|
||||
|
||||
Standard_EXPORT virtual void Delete();
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_AreaBuilder(){Delete() ; }
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_AreaBuilder();
|
||||
|
||||
//! Sets a AreaBuilder to find the areas on
|
||||
//! the shapes described by <LS> using the classifier <LC>.
|
||||
|
@@ -99,10 +99,10 @@ TopOpeBRepBuild_Builder::TopOpeBRepBuild_Builder(const TopOpeBRepDS_BuildTool& B
|
||||
|
||||
//modified by NIZHNY-MZV Sat May 6 10:04:49 2000
|
||||
//=======================================================================
|
||||
//function : Destroy
|
||||
//function : ~TopOpeBRepBuild_Builder
|
||||
//purpose : virtual destructor
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder::Destroy()
|
||||
TopOpeBRepBuild_Builder::~TopOpeBRepBuild_Builder()
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -89,8 +89,7 @@ public:
|
||||
|
||||
Standard_EXPORT TopOpeBRepBuild_Builder(const TopOpeBRepDS_BuildTool& BT);
|
||||
|
||||
Standard_EXPORT virtual void Destroy();
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_Builder() { Destroy() ; }
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_Builder();
|
||||
|
||||
Standard_EXPORT TopOpeBRepDS_BuildTool& ChangeBuildTool();
|
||||
|
||||
|
@@ -58,8 +58,7 @@ public:
|
||||
|
||||
Standard_EXPORT TopOpeBRepBuild_Builder1(const TopOpeBRepDS_BuildTool& BT);
|
||||
|
||||
Standard_EXPORT virtual void Destroy() Standard_OVERRIDE;
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_Builder1() { Destroy() ; }
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_Builder1();
|
||||
|
||||
//! Removes all splits and merges already performed.
|
||||
//! Does NOT clear the handled DS (except ShapeWithStatesMaps).
|
||||
|
@@ -87,10 +87,10 @@ extern Standard_Boolean GLOBAL_faces2d;
|
||||
|
||||
//modified by NIZNHY-PKV Mon Dec 16 11:38:55 2002 f
|
||||
//=======================================================================
|
||||
//function : Destroy
|
||||
//function : ~TopOpeBRepBuild_Builder1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void TopOpeBRepBuild_Builder1::Destroy()
|
||||
TopOpeBRepBuild_Builder1::~TopOpeBRepBuild_Builder1()
|
||||
{
|
||||
processedEdges.Clear();
|
||||
theUsedVertexMap.Clear();
|
||||
|
@@ -18,5 +18,5 @@
|
||||
#include <TopOpeBRepBuild_Loop.hxx>
|
||||
#include <TopOpeBRepBuild_LoopClassifier.hxx>
|
||||
|
||||
void TopOpeBRepBuild_LoopClassifier::Delete()
|
||||
TopOpeBRepBuild_LoopClassifier::~TopOpeBRepBuild_LoopClassifier()
|
||||
{}
|
||||
|
@@ -32,9 +32,7 @@ public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT virtual void Delete();
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_LoopClassifier(){Delete() ; }
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_LoopClassifier();
|
||||
|
||||
//! Returns the state of loop <L1> compared with loop <L2>.
|
||||
Standard_EXPORT virtual TopAbs_State Compare (const Handle(TopOpeBRepBuild_Loop)& L1, const Handle(TopOpeBRepBuild_Loop)& L2) = 0;
|
||||
|
@@ -27,7 +27,7 @@ myLoopIndex(1), myNbLoop(0)
|
||||
{
|
||||
}
|
||||
|
||||
void TopOpeBRepBuild_LoopSet::Delete()
|
||||
TopOpeBRepBuild_LoopSet::~TopOpeBRepBuild_LoopSet()
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -38,8 +38,7 @@ public:
|
||||
|
||||
Standard_EXPORT TopOpeBRepBuild_LoopSet();
|
||||
|
||||
Standard_EXPORT virtual void Delete();
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_LoopSet(){Delete() ; }
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_LoopSet();
|
||||
|
||||
Standard_EXPORT TopOpeBRepBuild_ListOfLoop& ChangeListOfLoop();
|
||||
|
||||
|
@@ -56,7 +56,7 @@ TopOpeBRepBuild_ShapeSet::TopOpeBRepBuild_ShapeSet(const TopAbs_ShapeEnum SubSha
|
||||
myCheckShape = Standard_False; // temporary NYI
|
||||
}
|
||||
|
||||
void TopOpeBRepBuild_ShapeSet::Delete()
|
||||
TopOpeBRepBuild_ShapeSet::~TopOpeBRepBuild_ShapeSet()
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -70,8 +70,7 @@ public:
|
||||
//! <checkshape>:check (or not) the shapes, startelements, elements added.
|
||||
Standard_EXPORT TopOpeBRepBuild_ShapeSet(const TopAbs_ShapeEnum SubShapeType, const Standard_Boolean checkshape = Standard_True);
|
||||
|
||||
Standard_EXPORT virtual void Delete();
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_ShapeSet(){Delete() ; }
|
||||
Standard_EXPORT virtual ~TopOpeBRepBuild_ShapeSet();
|
||||
|
||||
//! Adds <S> to the list of shapes. (wires or shells).
|
||||
Standard_EXPORT virtual void AddShape (const TopoDS_Shape& S);
|
||||
|
Reference in New Issue
Block a user