From 068a4971084bd1e415c6523c3b5eb5a48de520ca Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 12 Jun 2024 20:40:29 +0200 Subject: fix NodeInput stuff --- NodeInput.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'NodeInput.cpp') diff --git a/NodeInput.cpp b/NodeInput.cpp index 2fae505..6ee0db4 100644 --- a/NodeInput.cpp +++ b/NodeInput.cpp @@ -1,25 +1,25 @@ #include "NodeInput.h" #include "prut.h" - -NodeInput NodeInput::instance(NodeInput::type); NodeInputLow NodeInputLow::instance(NodeInputLow::type); NodeInputHigh NodeInputHigh::instance(NodeInputHigh::type); -NodeInput::NodeInput(const NodeInput * prototype) : Node() { } - -NodeInput * NodeInput::clone() const { - return new NodeInput(this); +NodeInput::NodeInput() { + this->max_inputs = -1; + this->max_inputs = 0; } -SignalLevel NodeInput::level() { - prutprint("BaseInput"); - return UNDEFINED; +NodeInputLow * NodeInputLow::clone() const { + return new NodeInputLow(this); } SignalLevel NodeInputLow::level() { prutprint("LOW"); return LOW; } + +NodeInputHigh * NodeInputHigh::clone() const { + return new NodeInputHigh(this); +} SignalLevel NodeInputHigh::level() { prutprint("HIGH"); return HIGH; -- cgit v1.2.3