Skip to content

Commit 8bd1d8f

Browse files
some commands were reversed
1 parent 472410e commit 8bd1d8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

LinkedList.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ namespace LinkedList {
6969
}
7070

7171
void append(List<type>* list) {
72-
for (Node<type>* i = this->head; i != nullptr; i = i->next)
73-
list->push(i->value);
72+
for (Node<type>* i = list->head; i != nullptr; i = i->next)
73+
this->push(i->value);
7474
}
7575

7676
void copy(List<type>* list) {
77-
list->clear();
77+
this->clear();
7878
this->append(list);
7979
}
8080

@@ -111,4 +111,4 @@ namespace LinkedList {
111111
};
112112
};
113113

114-
#endif
114+
#endif

0 commit comments

Comments
 (0)