switch setLast and setEnd
This commit is contained in:
parent
d1b9ab5126
commit
d7e157d908
@ -58,7 +58,7 @@ public:
|
|||||||
this->next = next;
|
this->next = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setLast() {
|
virtual void setEnd() {
|
||||||
this->next = nullptr;
|
this->next = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,8 +124,8 @@ public:
|
|||||||
currentElement->setNext(nextElement);
|
currentElement->setNext(nextElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setEnd(LinkedElement<T>* lastElement) {
|
void setLast(LinkedElement<T>* lastElement) {
|
||||||
lastElement->setLast();
|
lastElement->setEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
void insertElement(LinkedElement<T>* element, size_t position) {
|
void insertElement(LinkedElement<T>* element, size_t position) {
|
||||||
|
Loading…
Reference in New Issue
Block a user