summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/NodeBase.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/NodeBase.h')
-rw-r--r--src/libs/engine/NodeBase.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs/engine/NodeBase.h b/src/libs/engine/NodeBase.h
index d7748543..7dffc0c9 100644
--- a/src/libs/engine/NodeBase.h
+++ b/src/libs/engine/NodeBase.h
@@ -73,12 +73,13 @@ public:
virtual List<Node*>* dependants() { return _dependants; }
virtual void dependants(List<Node*>* l) { _dependants = l; }
- Patch* parent_patch() const { return (_parent == NULL) ? NULL : _parent->as_patch(); }
-
virtual const Plugin* plugin() const { return _plugin; }
void set_path(const Path& new_path);
+ /** A node's parent is always a patch, so static cast should be safe */
+ Patch* parent_patch() const { return (Patch*)_parent; }
+
protected:
// Disallow copies (undefined)
NodeBase(const NodeBase&);