瀏覽代碼

+ TLinkedList.RemoveAll

git-svn-id: trunk@36323 -
florian 8 年之前
父節點
當前提交
5e07957594
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      compiler/cclasses.pas

+ 10 - 0
compiler/cclasses.pas

@@ -378,6 +378,8 @@ type
           procedure insertListcopy(p : TLinkedList);
           { concats another List at the end and makes a copy }
           procedure concatListcopy(p : TLinkedList);
+          { removes all items from the list, the items are not freed }
+          procedure RemoveAll;
           property First:TLinkedListItem read FFirst;
           property Last:TLinkedListItem read FLast;
           property Count:Integer read FCount;
@@ -2356,6 +2358,14 @@ end;
       end;
 
 
+    procedure TLinkedList.RemoveAll;
+      begin
+        FFirst:=nil;
+        FLast:=nil;
+        FCount:=0;
+      end;
+
+
 {****************************************************************************
                              TCmdStrListItem
  ****************************************************************************}