Library 3

fixed memory leak issues + optimization
This commit is contained in:
Alessandro Ferro
2021-05-08 01:08:12 +02:00
parent c32e658308
commit 2e4f7c3de8
3 changed files with 11 additions and 5 deletions

View File

@ -142,7 +142,11 @@ BinaryTreeLnk<Data>& BinaryTreeLnk<Data>::operator=(BinaryTreeLnk<Data>&& tree)
template <typename Data>
bool BinaryTreeLnk<Data>::operator==(const BinaryTreeLnk<Data>& tree) const noexcept{
return (Root() == tree.Root());
if(size == tree.size){
return (Root() == tree.Root());
}else{
return false;
}
}
template <typename Data>