aboutsummaryrefslogtreecommitdiff
path: root/academic/bpp1.9-phyl/caps_TreeTemplateTools.patch
blob: b4f79029de515caa932c4b4ff1fb5834cc40a564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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;