aboutsummaryrefslogtreecommitdiff
path: root/NodeFactory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NodeFactory.cpp')
-rw-r--r--NodeFactory.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/NodeFactory.cpp b/NodeFactory.cpp
index c9d4f20..6105c2d 100644
--- a/NodeFactory.cpp
+++ b/NodeFactory.cpp
@@ -1,3 +1,4 @@
+#include <cassert>
#include <locale>
#include <ranges>
#include <algorithm>
@@ -22,7 +23,8 @@ void NodeFactory::assign(const char * _type, const Node * node) {
string type = _type;
type = normalize_type(type);
- if (has_type(type)) return; // TODO: exception?
+ // ensure there is only one class that registers a type
+ assert(!has_type(type));
// printf("map[\"%s\"] = %p\n", type.c_str(), node);
map[type] = node;