Library 3

zero errors in simpletest
This commit is contained in:
Alessandro Ferro 2021-05-05 10:47:44 +02:00
parent 4add56d732
commit 2b6dcf6700
1 changed files with 2 additions and 2 deletions

View File

@ -155,10 +155,10 @@ template <typename Data>
void BinaryTree<Data>::FoldPostOrder(const typename FoldableContainer<Data>::FoldFunctor function, const void* par, void* acc, const Node* node) const{
if(node != nullptr){
if(node->HasLeftChild()){
FoldPreOrder(function, par, acc, &(node->LeftChild()));
FoldPostOrder(function, par, acc, &(node->LeftChild()));
}
if(node->HasRightChild()){
FoldPreOrder(function, par, acc, &(node->RightChild()));
FoldPostOrder(function, par, acc, &(node->RightChild()));
}
function(node->Element(), par, acc);
}