From b1812915b99e79faa920003dcb371ef8d75f3037 Mon Sep 17 00:00:00 2001 From: p68710245 Date: Mon, 25 Mar 2024 10:15:35 +0800 Subject: [PATCH] Update List.hpp --- List.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/List.hpp b/List.hpp index 598d4de..58e3b60 100644 --- a/List.hpp +++ b/List.hpp @@ -41,7 +41,7 @@ template void List::clear() { while (head->link) - head->RemoveAfter(); + head->remove_after(); tail = head; // 务必注意本类当中的操作是否会影响tail } @@ -82,7 +82,7 @@ void List::print() const template void List::insert_front(Node *p) { - head->InsertAfter(p); + head->insert_after(p); if (tail == head) tail = p; // 注意可能修正tail } @@ -90,7 +90,7 @@ void List::insert_front(Node *p) template void List::insert_rear(Node *p) { - tail->InsertAfter(p); + tail->insert_after(p); tail = p; } @@ -102,7 +102,7 @@ Node *List::delete_node(Node *p) tempP = tempP->link; if (p == tail) tail = tempP; // 修正tail - return tempP->RemoveAfter(); + return tempP->remove_after(); } #endif \ No newline at end of file