12345678910111213141516171819202122232425262728293031323334353637383940 |
- diff -pruN orig/Phyl/TreeTemplateTools.h new/Phyl/TreeTemplateTools.h
- --- orig/Phyl/TreeTemplateTools.h 2010-04-01 16:37:04.000000000 +0300
- +++ new/Phyl/TreeTemplateTools.h 2017-02-03 14:33:11.000000000 +0200
- @@ -191,7 +191,7 @@ class TreeTemplateTools
- static void dropLeaf(TreeTemplate<N>& tree, const std::string& leafName) throw (NodeNotFoundException, Exception)
- {
- N* leaf = tree.getNode(leafName);
- - if (!leaf->hasfather())
- + if (!leaf->hasFather())
- throw Exception("TreeTemplateTools::dropLeaf(). Leaf is the only node in the tree, can't remove it.");
- N* parent = leaf->getFather();
- if (parent->getNumberOfSons() > 2)
- @@ -203,7 +203,7 @@ class TreeTemplateTools
- else if (parent->getNumberOfSons() == 2)
- {
- //We have to delete the parent node as well:
- - N* brother = parent->getson(0);
- + N* brother = parent->getSon(0);
- if (brother == leaf) brother = parent->getSon(1);
- if (!parent->hasFather())
- {
- @@ -212,7 +212,7 @@ class TreeTemplateTools
- {
- brother->setDistanceToFather(brother->getDistanceToFather() + leaf->getDistanceToFather());
- }
- - tree->setRootNode(brother);
- + tree.setRootNode(brother);
- delete parent;
- delete leaf;
- }
- @@ -223,7 +223,7 @@ class TreeTemplateTools
- {
- brother->setDistanceToFather(brother->getDistanceToFather() + parent->getDistanceToFather());
- }
- - unsigned int pos = gParent->getsonPosition(parent);
- + unsigned int pos = gParent->getSonPosition(parent);
- gParent->setSon(pos, brother);
- delete parent;
- delete leaf;
|