From 3cf454ef959b36f90803fb63fcb2fe26b85335a0 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 16 Jun 2024 09:21:18 +0200 Subject: better errors + fix min/max input shit --- NodeInput.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'NodeInput.cpp') diff --git a/NodeInput.cpp b/NodeInput.cpp index 591c2ca..e4ddbb9 100644 --- a/NodeInput.cpp +++ b/NodeInput.cpp @@ -1,12 +1,16 @@ #include "NodeInput.h" +#include "Exception.h" NodeInputLow NodeInputLow::instance(NodeInputLow::type); NodeInputHigh NodeInputHigh::instance(NodeInputHigh::type); -NodeInput::NodeInput() { - this->min_inputs = -1; +NodeInput::NodeInput() : Node() { + this->min_inputs = 0; this->max_inputs = 0; } +void NodeInput::addInput(Net *) { + throw NodeException(this, "NodeInput cannot have inputs"); +} NodeInputLow * NodeInputLow::clone() const { return new NodeInputLow(this); -- cgit v1.2.3