WOW. NodeTree deletes duplicate nodes. So x+x didn't work....
This commit is contained in:
1 parent
e04cf03858
commit
f1b0d46ca0
4 files changed
+35
-3
No files matched your search
+3
-3
@@ -130,7 +130,7 @@ template<class T>
|
||||
void NodeTree<T>::addChild(NodeTree<T>* child) {
|
||||
if (!child)
|
||||
throw "Help, NULL child";
|
||||
if (findChild(child) == -1)
|
||||
//if (findChild(child) == -1)
|
||||
children.push_back(child);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ template<class T>
|
||||
void NodeTree<T>::insertChild(int i, NodeTree<T>* child) {
|
||||
if (!child)
|
||||
throw "Help, NULL child";
|
||||
if (findChild(child) == -1)
|
||||
//if (findChild(child) == -1)
|
||||
children.insert(children.begin()+i,child);
|
||||
}
|
||||
|
||||
@@ -274,4 +274,4 @@ std::string NodeTree<T>::getDOTName() {
|
||||
return(replaceExEscape(DOTName, "\n", "\\n"));
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in new issue
Block a user