App: modernize C++: use equals default
This commit is contained in:
@@ -89,17 +89,6 @@ ColorField::ColorField (const ColorModel &rclModel, float fMin, float fMax, std:
|
||||
set(rclModel, fMin, fMax, usCt);
|
||||
}
|
||||
|
||||
ColorField::ColorField (const ColorField &rclCF)
|
||||
: colorModel(rclCF.colorModel)
|
||||
, fMin(rclCF.fMin)
|
||||
, fMax(rclCF.fMax)
|
||||
, fAscent(rclCF.fAscent)
|
||||
, fConstant(rclCF.fConstant)
|
||||
, ctColors(rclCF.ctColors)
|
||||
, colorField(rclCF.colorField)
|
||||
{
|
||||
}
|
||||
|
||||
ColorField& ColorField::operator = (const ColorField &rclCF)
|
||||
{
|
||||
colorField = rclCF.colorField;
|
||||
@@ -338,21 +327,6 @@ ColorLegend::ColorLegend ()
|
||||
values.push_back(1.0f);
|
||||
}
|
||||
|
||||
ColorLegend::ColorLegend (const ColorLegend &rclCL)
|
||||
{
|
||||
*this = rclCL;
|
||||
}
|
||||
|
||||
ColorLegend& ColorLegend::operator = (const ColorLegend &rclCL)
|
||||
{
|
||||
colorFields = rclCL.colorFields;
|
||||
names = rclCL.names;
|
||||
values = rclCL.values;
|
||||
outsideGrayed = rclCL.outsideGrayed;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool ColorLegend::operator == (const ColorLegend &rclCL) const
|
||||
{
|
||||
return (colorFields.size() == rclCL.colorFields.size()) &&
|
||||
|
||||
@@ -253,7 +253,7 @@ class AppExport ColorField
|
||||
{
|
||||
public:
|
||||
ColorField ();
|
||||
ColorField (const ColorField &rclCF);
|
||||
ColorField (const ColorField &rclCF) = default;
|
||||
ColorField (const ColorModel &rclModel, float fMin, float fMax, std::size_t usCt);
|
||||
virtual ~ColorField () = default;
|
||||
|
||||
@@ -441,10 +441,10 @@ class AppExport ColorLegend
|
||||
{
|
||||
public:
|
||||
ColorLegend ();
|
||||
ColorLegend (const ColorLegend &rclCL);
|
||||
ColorLegend (const ColorLegend &rclCL) = default;
|
||||
virtual ~ColorLegend () = default;
|
||||
|
||||
ColorLegend& operator = (const ColorLegend &rclCL);
|
||||
ColorLegend& operator = (const ColorLegend &rclCL) = default;
|
||||
bool operator == (const ColorLegend &rclCL) const;
|
||||
bool operator != (const ColorLegend &rclCL) const {
|
||||
return !(*this == rclCL);
|
||||
|
||||
@@ -259,10 +259,7 @@ Property *DocumentObjectT::getProperty() const {
|
||||
|
||||
SubObjectT::SubObjectT() = default;
|
||||
|
||||
SubObjectT::SubObjectT(const SubObjectT &other)
|
||||
:DocumentObjectT(other), subname(other.subname)
|
||||
{
|
||||
}
|
||||
SubObjectT::SubObjectT(const SubObjectT &) = default;
|
||||
|
||||
SubObjectT::SubObjectT(SubObjectT &&other)
|
||||
:DocumentObjectT(std::move(other)), subname(std::move(other.subname))
|
||||
|
||||
@@ -53,10 +53,6 @@ void App::Extension::init(){
|
||||
|
||||
using namespace App;
|
||||
|
||||
Extension::Extension()
|
||||
{
|
||||
}
|
||||
|
||||
Extension::~Extension()
|
||||
{
|
||||
if (!ExtensionPythonObject.is(Py::_None())){
|
||||
|
||||
@@ -228,7 +228,7 @@ class AppExport Extension
|
||||
|
||||
public:
|
||||
|
||||
Extension();
|
||||
Extension() = default;
|
||||
virtual ~Extension();
|
||||
|
||||
virtual void initExtension(App::ExtensionContainer* obj);
|
||||
|
||||
@@ -81,8 +81,7 @@ public:
|
||||
}
|
||||
|
||||
// Auto generated code. See class document of LinkParams.
|
||||
~LinkParamsP() override {
|
||||
}
|
||||
~LinkParamsP() override = default;
|
||||
|
||||
// Auto generated code. See class document of LinkParams.
|
||||
void OnChange(Base::Subject<const char*> &, const char* sReason) override {
|
||||
@@ -162,10 +161,6 @@ LinkBaseExtension::LinkBaseExtension()
|
||||
props.resize(PropMax,nullptr);
|
||||
}
|
||||
|
||||
LinkBaseExtension::~LinkBaseExtension()
|
||||
{
|
||||
}
|
||||
|
||||
PyObject* LinkBaseExtension::getExtensionPyObject() {
|
||||
if (ExtensionPythonObject.is(Py::_None())){
|
||||
// ref counter is set to 1
|
||||
@@ -2235,10 +2230,6 @@ LinkExtension::LinkExtension()
|
||||
LINK_PROPS_ADD_EXTENSION(LINK_PARAMS_EXT);
|
||||
}
|
||||
|
||||
LinkExtension::~LinkExtension()
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace App {
|
||||
|
||||
@@ -55,7 +55,7 @@ class AppExport LinkBaseExtension : public App::DocumentObjectExtension
|
||||
|
||||
public:
|
||||
LinkBaseExtension();
|
||||
~LinkBaseExtension() override;
|
||||
~LinkBaseExtension() override = default;
|
||||
|
||||
PropertyBool _LinkTouched;
|
||||
PropertyInteger _LinkOwner;
|
||||
@@ -411,7 +411,7 @@ class AppExport LinkExtension : public LinkBaseExtension
|
||||
|
||||
public:
|
||||
LinkExtension();
|
||||
~LinkExtension() override;
|
||||
~LinkExtension() override = default;
|
||||
|
||||
/** \name Helpers for defining extended parameter
|
||||
*
|
||||
|
||||
@@ -57,10 +57,6 @@ Material::Material(const MaterialType MatType)
|
||||
setType(MatType);
|
||||
}
|
||||
|
||||
Material::~Material()
|
||||
{
|
||||
}
|
||||
|
||||
void Material::set(const char* MatName)
|
||||
{
|
||||
if (strcmp("Brass",MatName) == 0 ) {
|
||||
|
||||
@@ -73,7 +73,6 @@ public:
|
||||
/** Does basically the same as the constructor above unless that it accepts a MaterialType as argument. */
|
||||
explicit Material(const MaterialType MatType);
|
||||
//@}
|
||||
~Material();
|
||||
|
||||
/** Set a material by name
|
||||
* There are some standard materials defined which are:
|
||||
|
||||
@@ -37,10 +37,6 @@ MaterialObject::MaterialObject()
|
||||
|
||||
}
|
||||
|
||||
MaterialObject::~MaterialObject()
|
||||
{
|
||||
}
|
||||
|
||||
// Python feature ---------------------------------------------------------
|
||||
|
||||
namespace App {
|
||||
|
||||
@@ -38,7 +38,6 @@ class AppExport MaterialObject : public DocumentObject
|
||||
public:
|
||||
/// Constructor
|
||||
MaterialObject();
|
||||
~MaterialObject() override;
|
||||
|
||||
App::PropertyMap Material;
|
||||
|
||||
|
||||
@@ -92,16 +92,9 @@ public:
|
||||
this->busy = false;
|
||||
}
|
||||
|
||||
ExpressionInfo(const ExpressionInfo & other) {
|
||||
expression = other.expression;
|
||||
busy = other.busy;
|
||||
}
|
||||
ExpressionInfo(const ExpressionInfo &) = default;
|
||||
|
||||
ExpressionInfo & operator=(const ExpressionInfo & other) {
|
||||
expression = other.expression;
|
||||
busy = other.busy;
|
||||
return *this;
|
||||
}
|
||||
ExpressionInfo & operator=(const ExpressionInfo &) = default;
|
||||
};
|
||||
|
||||
PropertyExpressionEngine();
|
||||
|
||||
Reference in New Issue
Block a user