diff --git a/librerie/exercise1/list/list.hpp b/librerie/exercise1/list/list.hpp index 926649b..f34c545 100644 --- a/librerie/exercise1/list/list.hpp +++ b/librerie/exercise1/list/list.hpp @@ -45,7 +45,7 @@ protected: /* ********************************************************************** */ // Destructor - ~Node() = default; + virtual ~Node() = default; /* ********************************************************************** */ @@ -83,7 +83,7 @@ public: /* ************************************************************************ */ // Destructor - ~List(); + virtual ~List(); /* ************************************************************************ */ diff --git a/librerie/exercise1/vector/vector.hpp b/librerie/exercise1/vector/vector.hpp index 2ae8fed..99386ec 100644 --- a/librerie/exercise1/vector/vector.hpp +++ b/librerie/exercise1/vector/vector.hpp @@ -40,7 +40,7 @@ public: Vector(Vector&&)noexcept; // Destructor - ~Vector(); + virtual ~Vector(); // Copy assignment Vector& operator=(const Vector&); diff --git a/librerie/exercise2/list/list.hpp b/librerie/exercise2/list/list.hpp index 926649b..f34c545 100644 --- a/librerie/exercise2/list/list.hpp +++ b/librerie/exercise2/list/list.hpp @@ -45,7 +45,7 @@ protected: /* ********************************************************************** */ // Destructor - ~Node() = default; + virtual ~Node() = default; /* ********************************************************************** */ @@ -83,7 +83,7 @@ public: /* ************************************************************************ */ // Destructor - ~List(); + virtual ~List(); /* ************************************************************************ */ diff --git a/librerie/exercise2/queue/lst/queuelst.hpp b/librerie/exercise2/queue/lst/queuelst.hpp index 92ea410..57bfe81 100755 --- a/librerie/exercise2/queue/lst/queuelst.hpp +++ b/librerie/exercise2/queue/lst/queuelst.hpp @@ -47,7 +47,7 @@ public: /* ************************************************************************ */ // Destructor - ~QueueLst(); + virtual ~QueueLst(); /* ************************************************************************ */ diff --git a/librerie/exercise2/queue/queue.hpp b/librerie/exercise2/queue/queue.hpp index ba810d8..47ff4eb 100755 --- a/librerie/exercise2/queue/queue.hpp +++ b/librerie/exercise2/queue/queue.hpp @@ -22,7 +22,7 @@ protected: public: // Destructor - ~Queue() = default; + virtual ~Queue() = default; /* ************************************************************************ */ diff --git a/librerie/exercise2/vector/vector.hpp b/librerie/exercise2/vector/vector.hpp index 2ae8fed..99386ec 100644 --- a/librerie/exercise2/vector/vector.hpp +++ b/librerie/exercise2/vector/vector.hpp @@ -40,7 +40,7 @@ public: Vector(Vector&&)noexcept; // Destructor - ~Vector(); + virtual ~Vector(); // Copy assignment Vector& operator=(const Vector&); diff --git a/librerie/exercise3/list/list.cpp b/librerie/exercise3/list/list.cpp old mode 100755 new mode 100644 diff --git a/librerie/exercise3/list/list.hpp b/librerie/exercise3/list/list.hpp old mode 100755 new mode 100644 index 926649b..f34c545 --- a/librerie/exercise3/list/list.hpp +++ b/librerie/exercise3/list/list.hpp @@ -45,7 +45,7 @@ protected: /* ********************************************************************** */ // Destructor - ~Node() = default; + virtual ~Node() = default; /* ********************************************************************** */ @@ -83,7 +83,7 @@ public: /* ************************************************************************ */ // Destructor - ~List(); + virtual ~List(); /* ************************************************************************ */ diff --git a/librerie/exercise3/queue/lst/queuelst.hpp b/librerie/exercise3/queue/lst/queuelst.hpp index 92ea410..57bfe81 100755 --- a/librerie/exercise3/queue/lst/queuelst.hpp +++ b/librerie/exercise3/queue/lst/queuelst.hpp @@ -47,7 +47,7 @@ public: /* ************************************************************************ */ // Destructor - ~QueueLst(); + virtual ~QueueLst(); /* ************************************************************************ */ diff --git a/librerie/exercise3/queue/queue.hpp b/librerie/exercise3/queue/queue.hpp index ba810d8..47ff4eb 100755 --- a/librerie/exercise3/queue/queue.hpp +++ b/librerie/exercise3/queue/queue.hpp @@ -22,7 +22,7 @@ protected: public: // Destructor - ~Queue() = default; + virtual ~Queue() = default; /* ************************************************************************ */ diff --git a/librerie/exercise3/vector/vector.cpp b/librerie/exercise3/vector/vector.cpp old mode 100755 new mode 100644 diff --git a/librerie/exercise3/vector/vector.hpp b/librerie/exercise3/vector/vector.hpp old mode 100755 new mode 100644 index 2ae8fed..99386ec --- a/librerie/exercise3/vector/vector.hpp +++ b/librerie/exercise3/vector/vector.hpp @@ -40,7 +40,7 @@ public: Vector(Vector&&)noexcept; // Destructor - ~Vector(); + virtual ~Vector(); // Copy assignment Vector& operator=(const Vector&); diff --git a/librerie/exercise4/binarytree/lnk/binarytreelnk.hpp b/librerie/exercise4/binarytree/lnk/binarytreelnk.hpp index 85c852e..09d5aa2 100755 --- a/librerie/exercise4/binarytree/lnk/binarytreelnk.hpp +++ b/librerie/exercise4/binarytree/lnk/binarytreelnk.hpp @@ -15,10 +15,11 @@ protected: protected: using BinaryTree::Node::data; + + public: struct NodeLnk* left = nullptr; struct NodeLnk* right = nullptr; - public: struct NodeLnk& operator=(const NodeLnk&); // Copy assignment of abstract types should not be possible. struct NodeLnk& operator=(NodeLnk&&) noexcept; // Move assignment of abstract types should not be possible. bool IsLeaf() const noexcept override; // (concrete function should not throw exceptions) diff --git a/librerie/exercise4/list/list.cpp b/librerie/exercise4/list/list.cpp old mode 100755 new mode 100644 diff --git a/librerie/exercise4/list/list.hpp b/librerie/exercise4/list/list.hpp old mode 100755 new mode 100644 index 926649b..f34c545 --- a/librerie/exercise4/list/list.hpp +++ b/librerie/exercise4/list/list.hpp @@ -45,7 +45,7 @@ protected: /* ********************************************************************** */ // Destructor - ~Node() = default; + virtual ~Node() = default; /* ********************************************************************** */ @@ -83,7 +83,7 @@ public: /* ************************************************************************ */ // Destructor - ~List(); + virtual ~List(); /* ************************************************************************ */ diff --git a/librerie/exercise4/queue/lst/queuelst.hpp b/librerie/exercise4/queue/lst/queuelst.hpp index 92ea410..57bfe81 100755 --- a/librerie/exercise4/queue/lst/queuelst.hpp +++ b/librerie/exercise4/queue/lst/queuelst.hpp @@ -47,7 +47,7 @@ public: /* ************************************************************************ */ // Destructor - ~QueueLst(); + virtual ~QueueLst(); /* ************************************************************************ */ diff --git a/librerie/exercise4/queue/queue.hpp b/librerie/exercise4/queue/queue.hpp index ba810d8..47ff4eb 100755 --- a/librerie/exercise4/queue/queue.hpp +++ b/librerie/exercise4/queue/queue.hpp @@ -22,7 +22,7 @@ protected: public: // Destructor - ~Queue() = default; + virtual ~Queue() = default; /* ************************************************************************ */ diff --git a/librerie/exercise4/vector/vector.cpp b/librerie/exercise4/vector/vector.cpp old mode 100755 new mode 100644 diff --git a/librerie/exercise4/vector/vector.hpp b/librerie/exercise4/vector/vector.hpp old mode 100755 new mode 100644 index 2ae8fed..99386ec --- a/librerie/exercise4/vector/vector.hpp +++ b/librerie/exercise4/vector/vector.hpp @@ -40,7 +40,7 @@ public: Vector(Vector&&)noexcept; // Destructor - ~Vector(); + virtual ~Vector(); // Copy assignment Vector& operator=(const Vector&); diff --git a/librerie/exercise5/binarytree/lnk/binarytreelnk.hpp b/librerie/exercise5/binarytree/lnk/binarytreelnk.hpp index 85c852e..09d5aa2 100755 --- a/librerie/exercise5/binarytree/lnk/binarytreelnk.hpp +++ b/librerie/exercise5/binarytree/lnk/binarytreelnk.hpp @@ -15,10 +15,11 @@ protected: protected: using BinaryTree::Node::data; + + public: struct NodeLnk* left = nullptr; struct NodeLnk* right = nullptr; - public: struct NodeLnk& operator=(const NodeLnk&); // Copy assignment of abstract types should not be possible. struct NodeLnk& operator=(NodeLnk&&) noexcept; // Move assignment of abstract types should not be possible. bool IsLeaf() const noexcept override; // (concrete function should not throw exceptions) diff --git a/librerie/exercise5/list/list.cpp b/librerie/exercise5/list/list.cpp old mode 100755 new mode 100644 diff --git a/librerie/exercise5/list/list.hpp b/librerie/exercise5/list/list.hpp old mode 100755 new mode 100644 index 926649b..f34c545 --- a/librerie/exercise5/list/list.hpp +++ b/librerie/exercise5/list/list.hpp @@ -45,7 +45,7 @@ protected: /* ********************************************************************** */ // Destructor - ~Node() = default; + virtual ~Node() = default; /* ********************************************************************** */ @@ -83,7 +83,7 @@ public: /* ************************************************************************ */ // Destructor - ~List(); + virtual ~List(); /* ************************************************************************ */ diff --git a/librerie/exercise5/queue/lst/queuelst.hpp b/librerie/exercise5/queue/lst/queuelst.hpp index 92ea410..57bfe81 100755 --- a/librerie/exercise5/queue/lst/queuelst.hpp +++ b/librerie/exercise5/queue/lst/queuelst.hpp @@ -47,7 +47,7 @@ public: /* ************************************************************************ */ // Destructor - ~QueueLst(); + virtual ~QueueLst(); /* ************************************************************************ */ diff --git a/librerie/exercise5/queue/queue.hpp b/librerie/exercise5/queue/queue.hpp index ba810d8..47ff4eb 100755 --- a/librerie/exercise5/queue/queue.hpp +++ b/librerie/exercise5/queue/queue.hpp @@ -22,7 +22,7 @@ protected: public: // Destructor - ~Queue() = default; + virtual ~Queue() = default; /* ************************************************************************ */ diff --git a/librerie/exercise5/vector/vector.cpp b/librerie/exercise5/vector/vector.cpp old mode 100755 new mode 100644 diff --git a/librerie/exercise5/vector/vector.hpp b/librerie/exercise5/vector/vector.hpp old mode 100755 new mode 100644 index 2ae8fed..99386ec --- a/librerie/exercise5/vector/vector.hpp +++ b/librerie/exercise5/vector/vector.hpp @@ -40,7 +40,7 @@ public: Vector(Vector&&)noexcept; // Destructor - ~Vector(); + virtual ~Vector(); // Copy assignment Vector& operator=(const Vector&);