Skip to content

Commit

Permalink
+ Make destructor virtual for classes with virtual methods (based on …
Browse files Browse the repository at this point in the history
…DevJohan's patch)
  • Loading branch information
wwmayer committed Jul 26, 2014
1 parent 4dee80f commit 6b1e6a6
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 25 deletions.
1 change: 1 addition & 0 deletions src/App/ComplexGeoData.h
Expand Up @@ -48,6 +48,7 @@ class AppExport Segment: public Base::BaseClass
TYPESYSTEM_HEADER();

public:
virtual ~Segment(){}
virtual std::string getName() const=0;
};

Expand Down
14 changes: 7 additions & 7 deletions src/App/PropertyGeo.h
Expand Up @@ -68,7 +68,7 @@ class AppExport PropertyVector: public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyVector();
virtual ~PropertyVector();

/** Sets the property
*/
Expand Down Expand Up @@ -115,7 +115,7 @@ class AppExport PropertyVectorList: public PropertyLists
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyVectorList();
virtual ~PropertyVectorList();

virtual void setSize(int newSize);
virtual int getSize(void) const;
Expand Down Expand Up @@ -178,7 +178,7 @@ class AppExport PropertyMatrix: public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyMatrix();
virtual ~PropertyMatrix();

/** Sets the property
*/
Expand Down Expand Up @@ -226,7 +226,7 @@ class AppExport PropertyPlacement: public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyPlacement();
virtual ~PropertyPlacement();

/** Sets the property
*/
Expand Down Expand Up @@ -276,7 +276,7 @@ class AppExport PropertyPlacementLink : public PropertyLink
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyPlacementLink();
virtual ~PropertyPlacementLink();

/** This method returns the linked DocumentObject
*/
Expand All @@ -295,7 +295,7 @@ class AppExport PropertyGeometry : public App::Property

public:
PropertyGeometry();
~PropertyGeometry();
virtual ~PropertyGeometry();

/** @name Modification */
//@{
Expand All @@ -315,7 +315,7 @@ class AppExport PropertyComplexGeoData : public App::PropertyGeometry

public:
PropertyComplexGeoData();
~PropertyComplexGeoData();
virtual ~PropertyComplexGeoData();

/** @name Modification */
//@{
Expand Down
4 changes: 2 additions & 2 deletions src/App/PropertyLinks.h
Expand Up @@ -58,7 +58,7 @@ class AppExport PropertyLink : public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyLink();
virtual ~PropertyLink();

/** Sets the property
*/
Expand Down Expand Up @@ -120,7 +120,7 @@ class AppExport PropertyLinkSub: public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyLinkSub();
virtual ~PropertyLinkSub();

/** Sets the property
*/
Expand Down
26 changes: 13 additions & 13 deletions src/App/PropertyStandard.h
Expand Up @@ -54,7 +54,7 @@ class AppExport PropertyInteger: public Property

public:
PropertyInteger();
~PropertyInteger();
virtual ~PropertyInteger();

/** Sets the property
*/
Expand Down Expand Up @@ -90,7 +90,7 @@ class AppExport PropertyPath: public Property
public:

PropertyPath();
~PropertyPath();
virtual ~PropertyPath();

/** Sets the property
*/
Expand Down Expand Up @@ -142,7 +142,7 @@ class AppExport PropertyEnumeration: public PropertyInteger
PropertyEnumeration();

/// destructor
~PropertyEnumeration();
virtual ~PropertyEnumeration();

/// Enumeration methods
//@{
Expand Down Expand Up @@ -207,7 +207,7 @@ class AppExport PropertyIntegerConstraint: public PropertyInteger
PropertyIntegerConstraint();

/// destructor
~PropertyIntegerConstraint();
virtual ~PropertyIntegerConstraint();

/// Constraint methods
//@{
Expand Down Expand Up @@ -249,7 +249,7 @@ class AppExport PropertyPercent: public PropertyIntegerConstraint
PropertyPercent();

/// destructor
~PropertyPercent();
virtual ~PropertyPercent();
};

/** Integer list properties
Expand All @@ -271,7 +271,7 @@ class AppExport PropertyIntegerList: public PropertyLists
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyIntegerList();
virtual ~PropertyIntegerList();

virtual void setSize(int newSize);
virtual int getSize(void) const;
Expand Down Expand Up @@ -321,7 +321,7 @@ class AppExport PropertyIntegerSet: public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyIntegerSet();
virtual ~PropertyIntegerSet();

/** Sets the property
*/
Expand Down Expand Up @@ -367,7 +367,7 @@ class AppExport PropertyMap: public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyMap();
virtual ~PropertyMap();

virtual int getSize(void) const;

Expand Down Expand Up @@ -670,7 +670,7 @@ class AppExport PropertyStringList: public PropertyLists
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyStringList();
virtual ~PropertyStringList();

virtual void setSize(int newSize);
virtual int getSize(void) const;
Expand Down Expand Up @@ -756,7 +756,7 @@ class AppExport PropertyBoolList : public PropertyLists

public:
PropertyBoolList();
~PropertyBoolList();
virtual ~PropertyBoolList();

virtual void setSize(int newSize);
virtual int getSize(void) const;
Expand Down Expand Up @@ -804,7 +804,7 @@ class AppExport PropertyColor : public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyColor();
virtual ~PropertyColor();

/** Sets the property
*/
Expand Down Expand Up @@ -850,7 +850,7 @@ class AppExport PropertyColorList: public PropertyLists
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyColorList();
virtual ~PropertyColorList();

virtual void setSize(int newSize);
virtual int getSize(void) const;
Expand Down Expand Up @@ -903,7 +903,7 @@ class AppExport PropertyMaterial : public Property
* A destructor.
* A more elaborate description of the destructor.
*/
~PropertyMaterial();
virtual ~PropertyMaterial();

/** Sets the property
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Gui/InputField.cpp
Expand Up @@ -60,8 +60,8 @@ class InputValidator : public QValidator

InputField::InputField(QWidget * parent)
: QLineEdit(parent),
actUnitValue(0),
validInput(true),
actUnitValue(0),
Maximum(DOUBLE_MAX),
Minimum(-DOUBLE_MAX),
StepSize(1.0),
Expand Down
3 changes: 3 additions & 0 deletions src/Mod/Mesh/App/Core/Algorithm.h
Expand Up @@ -318,13 +318,15 @@ class MeshExport MeshCollector
{
public:
MeshCollector(){}
virtual ~MeshCollector(){}
virtual void Append(const MeshCore::MeshKernel&, unsigned long index) = 0;
};

class MeshExport PointCollector : public MeshCollector
{
public:
PointCollector(std::vector<unsigned long>& ind) : indices(ind){}
virtual ~PointCollector(){}
virtual void Append(const MeshCore::MeshKernel& kernel, unsigned long index)
{
unsigned long ulP1, ulP2, ulP3;
Expand All @@ -342,6 +344,7 @@ class MeshExport FacetCollector : public MeshCollector
{
public:
FacetCollector(std::vector<unsigned long>& ind) : indices(ind){}
virtual ~FacetCollector(){}
void Append(const MeshCore::MeshKernel&, unsigned long index)
{
indices.push_back(index);
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Mesh/App/Mesh.h
Expand Up @@ -82,7 +82,7 @@ class MeshExport MeshObject : public Data::ComplexGeoData
explicit MeshObject(const MeshCore::MeshKernel& Kernel);
explicit MeshObject(const MeshCore::MeshKernel& Kernel, const Base::Matrix4D &Mtrx);
MeshObject(const MeshObject&);
~MeshObject();
virtual ~MeshObject();

void operator = (const MeshObject&);

Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Sketcher/App/Constraint.h
Expand Up @@ -56,9 +56,9 @@ class SketcherExport Constraint : public Base::Persistence
TYPESYSTEM_HEADER();

public:
~Constraint();
Constraint();
Constraint(const Constraint&);
virtual ~Constraint();
virtual Constraint *clone(void) const;

static const int GeoUndef;
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Sketcher/App/freegcs/Constraints.h
Expand Up @@ -58,6 +58,7 @@ namespace GCS
int tag;
public:
Constraint();
virtual ~Constraint(){}

inline VEC_pD params() { return pvec; }

Expand Down

0 comments on commit 6b1e6a6

Please sign in to comment.