mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
fix: clang-tidy fixes
This commit is contained in:
parent
5ef67bfe44
commit
b24ca86e20
@ -97,8 +97,9 @@ static void test() {
|
|||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
while (head) {
|
while (head) {
|
||||||
ListNode* t = head->next;
|
ListNode* t = head;
|
||||||
delete head;
|
head = head->next;
|
||||||
|
delete t;
|
||||||
}
|
}
|
||||||
|
|
||||||
head = new ListNode;
|
head = new ListNode;
|
||||||
@ -106,7 +107,7 @@ static void test() {
|
|||||||
|
|
||||||
temp1 = head;
|
temp1 = head;
|
||||||
for (int i = 1; i < 7; ++i) {
|
for (int i = 1; i < 7; ++i) {
|
||||||
ListNode* temp2 = new ListNode;
|
auto temp2 = new ListNode;
|
||||||
temp2->val = i;
|
temp2->val = i;
|
||||||
|
|
||||||
temp1->next = temp2;
|
temp1->next = temp2;
|
||||||
|
Loading…
Reference in New Issue
Block a user