mirror of
https://github.com/xfarrow/lasd.git
synced 2025-02-19 13:40:37 +01:00
Update
Added missing virtual keywords to destructors
This commit is contained in:
parent
b3ca7292c1
commit
31f7ae9b35
@ -45,7 +45,7 @@ protected:
|
||||
/* ********************************************************************** */
|
||||
|
||||
// Destructor
|
||||
~Node() = default;
|
||||
virtual ~Node() = default;
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~List();
|
||||
virtual ~List();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
Vector(Vector&&)noexcept;
|
||||
|
||||
// Destructor
|
||||
~Vector();
|
||||
virtual ~Vector();
|
||||
|
||||
// Copy assignment
|
||||
Vector& operator=(const Vector&);
|
||||
|
@ -45,7 +45,7 @@ protected:
|
||||
/* ********************************************************************** */
|
||||
|
||||
// Destructor
|
||||
~Node() = default;
|
||||
virtual ~Node() = default;
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~List();
|
||||
virtual ~List();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~QueueLst();
|
||||
virtual ~QueueLst();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -22,7 +22,7 @@ protected:
|
||||
public:
|
||||
|
||||
// Destructor
|
||||
~Queue() = default;
|
||||
virtual ~Queue() = default;
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -40,7 +40,7 @@ public:
|
||||
Vector(Vector&&)noexcept;
|
||||
|
||||
// Destructor
|
||||
~Vector();
|
||||
virtual ~Vector();
|
||||
|
||||
// Copy assignment
|
||||
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
|
||||
~Node() = default;
|
||||
virtual ~Node() = default;
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~List();
|
||||
virtual ~List();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~QueueLst();
|
||||
virtual ~QueueLst();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -22,7 +22,7 @@ protected:
|
||||
public:
|
||||
|
||||
// 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;
|
||||
|
||||
// Destructor
|
||||
~Vector();
|
||||
virtual ~Vector();
|
||||
|
||||
// Copy assignment
|
||||
Vector& operator=(const Vector&);
|
||||
|
@ -15,10 +15,11 @@ protected:
|
||||
protected:
|
||||
|
||||
using BinaryTree<Data>::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)
|
||||
|
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
|
||||
~Node() = default;
|
||||
virtual ~Node() = default;
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~List();
|
||||
virtual ~List();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~QueueLst();
|
||||
virtual ~QueueLst();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -22,7 +22,7 @@ protected:
|
||||
public:
|
||||
|
||||
// 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;
|
||||
|
||||
// Destructor
|
||||
~Vector();
|
||||
virtual ~Vector();
|
||||
|
||||
// Copy assignment
|
||||
Vector& operator=(const Vector&);
|
||||
|
@ -15,10 +15,11 @@ protected:
|
||||
protected:
|
||||
|
||||
using BinaryTree<Data>::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)
|
||||
|
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
|
||||
~Node() = default;
|
||||
virtual ~Node() = default;
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
@ -83,7 +83,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~List();
|
||||
virtual ~List();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -47,7 +47,7 @@ public:
|
||||
/* ************************************************************************ */
|
||||
|
||||
// Destructor
|
||||
~QueueLst();
|
||||
virtual ~QueueLst();
|
||||
|
||||
/* ************************************************************************ */
|
||||
|
||||
|
@ -22,7 +22,7 @@ protected:
|
||||
public:
|
||||
|
||||
// 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;
|
||||
|
||||
// Destructor
|
||||
~Vector();
|
||||
virtual ~Vector();
|
||||
|
||||
// Copy assignment
|
||||
Vector& operator=(const Vector&);
|
||||
|
Loading…
x
Reference in New Issue
Block a user