slackbuilds_ponce/academic/bpp1.9-phyl/caps_TreeTemplateTools.patch
Petar Petrov 1f0ff62f35 academic/bpp1.9-phyl: Added (Bio++ 1.9 Phyl Library)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
2022-09-09 03:07:45 +01:00

39 lines
1.7 KiB
Diff

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;