switch setLast and setEnd

This commit is contained in:
Robin Müller 2020-07-13 19:53:44 +02:00
parent d1b9ab5126
commit d7e157d908

View File

@ -58,7 +58,7 @@ public:
this->next = next;
}
virtual void setLast() {
virtual void setEnd() {
this->next = nullptr;
}
@ -124,8 +124,8 @@ public:
currentElement->setNext(nextElement);
}
void setEnd(LinkedElement<T>* lastElement) {
lastElement->setLast();
void setLast(LinkedElement<T>* lastElement) {
lastElement->setEnd();
}
void insertElement(LinkedElement<T>* element, size_t position) {