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
@@ -28,11 +28,6 @@ TimeInput::TimeInput()
{
}
Node *TimeInput::copy() const
{
return new TimeInput();
}
QString TimeInput::Name() const
{
return tr("Time");
+2 -4
View File
@@ -27,13 +27,11 @@ namespace olive {
class TimeInput : public Node
{
Q_OBJECT
Q_OBJECT
public:
TimeInput();
NODE_DEFAULT_DESTRUCTOR(TimeInput)
virtual Node* copy() const override;
NODE_DEFAULT_FUNCTIONS(TimeInput)
virtual QString Name() const override;
virtual QString id() const override;
+1 -6
View File
@@ -31,12 +31,7 @@ class ValueNode : public Node
public:
ValueNode();
NODE_DEFAULT_DESTRUCTOR(ValueNode)
virtual Node* copy() const override
{
return new ValueNode();
}
NODE_DEFAULT_FUNCTIONS(ValueNode)
virtual QString Name() const override
{