code: use macros for default node functions

Easier to maintain
This commit is contained in:
itsmattkc
2022-05-04 11:01:17 -07:00
parent 91b761693b
commit d55d9c820f
69 changed files with 49 additions and 269 deletions
-5
View File
@@ -42,11 +42,6 @@ PanNode::PanNode()
SetEffectInput(kSamplesInput);
}
Node *PanNode::copy() const
{
return new PanNode();
}
QString PanNode::Name() const
{
return tr("Pan");
+1 -3
View File
@@ -31,9 +31,7 @@ class PanNode : public Node
public:
PanNode();
NODE_DEFAULT_DESTRUCTOR(PanNode)
virtual Node* copy() const override;
NODE_DEFAULT_FUNCTIONS(PanNode)
virtual QString Name() const override;
virtual QString id() const override;
-5
View File
@@ -41,11 +41,6 @@ VolumeNode::VolumeNode()
SetEffectInput(kSamplesInput);
}
Node *VolumeNode::copy() const
{
return new VolumeNode();
}
QString VolumeNode::Name() const
{
return tr("Volume");
+1 -3
View File
@@ -31,9 +31,7 @@ class VolumeNode : public MathNodeBase
public:
VolumeNode();
NODE_DEFAULT_DESTRUCTOR(VolumeNode)
virtual Node* copy() const override;
NODE_DEFAULT_FUNCTIONS(VolumeNode)
virtual QString Name() const override;
virtual QString id() const override;