mirror of
https://github.com/xfarrow/lasd.git
synced 2025-06-05 21:49:14 +02:00
Update
Added missing virtual keywords to destructors
This commit is contained in:
@ -45,7 +45,7 @@ protected:
|
|||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Node() = default;
|
virtual ~Node() = default;
|
||||||
|
|
||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~List();
|
virtual ~List();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
Vector(Vector&&)noexcept;
|
Vector(Vector&&)noexcept;
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Vector();
|
virtual ~Vector();
|
||||||
|
|
||||||
// Copy assignment
|
// Copy assignment
|
||||||
Vector& operator=(const Vector&);
|
Vector& operator=(const Vector&);
|
||||||
|
@ -45,7 +45,7 @@ protected:
|
|||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Node() = default;
|
virtual ~Node() = default;
|
||||||
|
|
||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~List();
|
virtual ~List();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~QueueLst();
|
virtual ~QueueLst();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Queue() = default;
|
virtual ~Queue() = default;
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
Vector(Vector&&)noexcept;
|
Vector(Vector&&)noexcept;
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Vector();
|
virtual ~Vector();
|
||||||
|
|
||||||
// Copy assignment
|
// Copy assignment
|
||||||
Vector& operator=(const Vector&);
|
Vector& operator=(const Vector&);
|
||||||
|
0
librerie/exercise3/list/list.cpp
Executable file → Normal file
0
librerie/exercise3/list/list.cpp
Executable file → Normal file
4
librerie/exercise3/list/list.hpp
Executable file → Normal file
4
librerie/exercise3/list/list.hpp
Executable file → Normal file
@ -45,7 +45,7 @@ protected:
|
|||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Node() = default;
|
virtual ~Node() = default;
|
||||||
|
|
||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~List();
|
virtual ~List();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~QueueLst();
|
virtual ~QueueLst();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Queue() = default;
|
virtual ~Queue() = default;
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
0
librerie/exercise3/vector/vector.cpp
Executable file → Normal file
0
librerie/exercise3/vector/vector.cpp
Executable file → Normal file
2
librerie/exercise3/vector/vector.hpp
Executable file → Normal file
2
librerie/exercise3/vector/vector.hpp
Executable file → Normal file
@ -40,7 +40,7 @@ public:
|
|||||||
Vector(Vector&&)noexcept;
|
Vector(Vector&&)noexcept;
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Vector();
|
virtual ~Vector();
|
||||||
|
|
||||||
// Copy assignment
|
// Copy assignment
|
||||||
Vector& operator=(const Vector&);
|
Vector& operator=(const Vector&);
|
||||||
|
@ -15,10 +15,11 @@ protected:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
using BinaryTree<Data>::Node::data;
|
using BinaryTree<Data>::Node::data;
|
||||||
|
|
||||||
|
public:
|
||||||
struct NodeLnk* left = nullptr;
|
struct NodeLnk* left = nullptr;
|
||||||
struct NodeLnk* right = nullptr;
|
struct NodeLnk* right = nullptr;
|
||||||
|
|
||||||
public:
|
|
||||||
struct NodeLnk& operator=(const NodeLnk&); // Copy assignment of abstract types should not be possible.
|
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.
|
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)
|
bool IsLeaf() const noexcept override; // (concrete function should not throw exceptions)
|
||||||
|
0
librerie/exercise4/list/list.cpp
Executable file → Normal file
0
librerie/exercise4/list/list.cpp
Executable file → Normal file
4
librerie/exercise4/list/list.hpp
Executable file → Normal file
4
librerie/exercise4/list/list.hpp
Executable file → Normal file
@ -45,7 +45,7 @@ protected:
|
|||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Node() = default;
|
virtual ~Node() = default;
|
||||||
|
|
||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~List();
|
virtual ~List();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~QueueLst();
|
virtual ~QueueLst();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Queue() = default;
|
virtual ~Queue() = default;
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
0
librerie/exercise4/vector/vector.cpp
Executable file → Normal file
0
librerie/exercise4/vector/vector.cpp
Executable file → Normal file
2
librerie/exercise4/vector/vector.hpp
Executable file → Normal file
2
librerie/exercise4/vector/vector.hpp
Executable file → Normal file
@ -40,7 +40,7 @@ public:
|
|||||||
Vector(Vector&&)noexcept;
|
Vector(Vector&&)noexcept;
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Vector();
|
virtual ~Vector();
|
||||||
|
|
||||||
// Copy assignment
|
// Copy assignment
|
||||||
Vector& operator=(const Vector&);
|
Vector& operator=(const Vector&);
|
||||||
|
@ -15,10 +15,11 @@ protected:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
using BinaryTree<Data>::Node::data;
|
using BinaryTree<Data>::Node::data;
|
||||||
|
|
||||||
|
public:
|
||||||
struct NodeLnk* left = nullptr;
|
struct NodeLnk* left = nullptr;
|
||||||
struct NodeLnk* right = nullptr;
|
struct NodeLnk* right = nullptr;
|
||||||
|
|
||||||
public:
|
|
||||||
struct NodeLnk& operator=(const NodeLnk&); // Copy assignment of abstract types should not be possible.
|
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.
|
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)
|
bool IsLeaf() const noexcept override; // (concrete function should not throw exceptions)
|
||||||
|
0
librerie/exercise5/list/list.cpp
Executable file → Normal file
0
librerie/exercise5/list/list.cpp
Executable file → Normal file
4
librerie/exercise5/list/list.hpp
Executable file → Normal file
4
librerie/exercise5/list/list.hpp
Executable file → Normal file
@ -45,7 +45,7 @@ protected:
|
|||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Node() = default;
|
virtual ~Node() = default;
|
||||||
|
|
||||||
/* ********************************************************************** */
|
/* ********************************************************************** */
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~List();
|
virtual ~List();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~QueueLst();
|
virtual ~QueueLst();
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Queue() = default;
|
virtual ~Queue() = default;
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
||||||
|
0
librerie/exercise5/vector/vector.cpp
Executable file → Normal file
0
librerie/exercise5/vector/vector.cpp
Executable file → Normal file
2
librerie/exercise5/vector/vector.hpp
Executable file → Normal file
2
librerie/exercise5/vector/vector.hpp
Executable file → Normal file
@ -40,7 +40,7 @@ public:
|
|||||||
Vector(Vector&&)noexcept;
|
Vector(Vector&&)noexcept;
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Vector();
|
virtual ~Vector();
|
||||||
|
|
||||||
// Copy assignment
|
// Copy assignment
|
||||||
Vector& operator=(const Vector&);
|
Vector& operator=(const Vector&);
|
||||||
|
Reference in New Issue
Block a user