Website Summary Files Commits Branches @commit @diff @stats
path: root / src / List / List.cpp
diff options
context:
space:
mode:
Commit6cdf1b7017c6988213dd881ca1f42b22d75bbf3b (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-28 19:15:41 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-04-28 19:15:41 +0300
Filescfb7dd5fe3b35dbffceb06d62f3d01559205b23d /src/List/List.cpp
FMI-OOP-P1_TicketSystem-6cdf1b7017c6988213dd881ca1f42b22d75bbf3b.tar
FMI-OOP-P1_TicketSystem-6cdf1b7017c6988213dd881ca1f42b22d75bbf3b.tar.gz
FMI-OOP-P1_TicketSystem-6cdf1b7017c6988213dd881ca1f42b22d75bbf3b.zip
Parent9f5eb77f6a8cba01158c37dc17e7e53574d87127 (diff)
Autocommit at 28.04.2022 @ 19:15
1 files changed, 2 insertions, 1 deletions
-rw-r--r--src/List/List.cpp3
diff --git a/src/List/List.cpp b/src/List/List.cpp
index 1312e61..66d66df 100644
--- a/src/List/List.cpp
+++ b/src/List/List.cpp
@@ -90,7 +90,8 @@ List<T>::List(List&& other) {
template <class T>
List<T>& List<T>::operator=(List&& other) {
- if (this != other) {
+ if (this != &other) {
+ free();
length = other.length;
count = other.count;
elements = other.elements;