code: use macros for default node functions
Easier to maintain
This commit is contained in:
@@ -42,11 +42,6 @@ MathNode::MathNode()
|
||||
SetInputProperty(kParamBIn, QStringLiteral("autotrim"), true);
|
||||
}
|
||||
|
||||
Node *MathNode::copy() const
|
||||
{
|
||||
return new MathNode();
|
||||
}
|
||||
|
||||
QString MathNode::Name() const
|
||||
{
|
||||
return tr("Math");
|
||||
|
||||
@@ -31,9 +31,7 @@ class MathNode : public MathNodeBase
|
||||
public:
|
||||
MathNode();
|
||||
|
||||
NODE_DEFAULT_DESTRUCTOR(MathNode)
|
||||
|
||||
virtual Node* copy() const override;
|
||||
NODE_DEFAULT_FUNCTIONS(MathNode)
|
||||
|
||||
virtual QString Name() const override;
|
||||
virtual QString id() const override;
|
||||
|
||||
@@ -30,8 +30,6 @@ class MathNodeBase : public Node
|
||||
public:
|
||||
MathNodeBase() = default;
|
||||
|
||||
NODE_DEFAULT_DESTRUCTOR(MathNodeBase)
|
||||
|
||||
enum Operation {
|
||||
kOpAdd,
|
||||
kOpSubtract,
|
||||
|
||||
Reference in New Issue
Block a user