From a062709dc42e687e8dff138e7904fcedce9ca9e3 Mon Sep 17 00:00:00 2001 From: Alessandro Ferro <49845537+xfarrow@users.noreply.github.com> Date: Tue, 11 May 2021 07:00:36 +0200 Subject: [PATCH] Library 3 bugfix --- librerie/exercise3/binarytree/lnk/binarytreelnk.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/librerie/exercise3/binarytree/lnk/binarytreelnk.cpp b/librerie/exercise3/binarytree/lnk/binarytreelnk.cpp index a14fe11..5b49da9 100755 --- a/librerie/exercise3/binarytree/lnk/binarytreelnk.cpp +++ b/librerie/exercise3/binarytree/lnk/binarytreelnk.cpp @@ -143,7 +143,8 @@ BinaryTreeLnk& BinaryTreeLnk::operator=(BinaryTreeLnk&& tree) template bool BinaryTreeLnk::operator==(const BinaryTreeLnk& tree) const noexcept{ if(size == tree.size){ - return (Root() == tree.Root()); + if(size == 0) return true; + else return (Root() == tree.Root()); }else{ return false; }