fix: clang-tidy fixes

This commit is contained in:
weiss-ben 2022-09-23 16:28:04 +03:00
parent 5ef67bfe44
commit b24ca86e20

View File

@ -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;