mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-28 10:02:43 +01:00
1f0ff62f35
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
39 lines
1.7 KiB
Diff
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;
|