Browse Source

* Patch from Luiz americo to use FPList where possible

git-svn-id: trunk@15663 -
michael 15 years ago
parent
commit
4d2786d238

+ 1 - 1
rtl/objpas/classes/action.inc

@@ -88,7 +88,7 @@ end;
 constructor TBasicAction.Create(AOwner: TComponent);
 begin
   inherited Create(AOwner);
-  FClients := TList.Create;
+  FClients := TFpList.Create;
 end;
 
 

+ 4 - 4
rtl/objpas/classes/classes.inc

@@ -721,15 +721,15 @@ begin
 end;
 
 threadvar
-  GlobalLoaded, GlobalLists: TList;
+  GlobalLoaded, GlobalLists: TFpList;
 
 procedure BeginGlobalLoading;
 
 begin
   if not Assigned(GlobalLists) then
-    GlobalLists := TList.Create;
+    GlobalLists := TFpList.Create;
   GlobalLists.Add(GlobalLoaded);
-  GlobalLoaded := TList.Create;
+  GlobalLoaded := TFpList.Create;
 end;
 
 
@@ -747,7 +747,7 @@ procedure EndGlobalLoading;
 begin
   { Free the memory occupied by BeginGlobalLoading }
   GlobalLoaded.Free;
-  GlobalLoaded := TList(GlobalLists.Last);
+  GlobalLoaded := TFpList(GlobalLists.Last);
   GlobalLists.Delete(GlobalLists.Count - 1);
   if GlobalLists.Count = 0 then
   begin

+ 5 - 5
rtl/objpas/classes/classesh.inc

@@ -469,7 +469,7 @@ type
   TCollection = class(TPersistent)
   private
     FItemClass: TCollectionItemClass;
-    FItems: TList;
+    FItems: TFpList;
     FUpdateCount: Integer;
     FNextID: Integer;
     FPropName: string;
@@ -1131,7 +1131,7 @@ type
     FOwner: TComponent;
     FParent: TComponent;
     FFixups: TObject;
-    FLoaded: TList;
+    FLoaded: TFpList;
     FOnFindMethod: TFindMethodEvent;
     FOnSetMethodProperty: TSetMethodPropertyEvent;
     FOnSetName: TSetNameEvent;
@@ -1575,8 +1575,8 @@ type
     FOwner: TComponent;
     FName: TComponentName;
     FTag: Longint;
-    FComponents: TList;
-    FFreeNotifies: TList;
+    FComponents: TFpList;
+    FFreeNotifies: TFpList;
     FDesignInfo: Longint;
     FVCLComObject: Pointer;
     FComponentState: TComponentState;
@@ -1708,7 +1708,7 @@ type
     FOnExecute: TNotifyEvent;
     FOnUpdate: TNotifyEvent;
   protected
-    FClients: TList;
+    FClients: TFpList;
     procedure Change; virtual;
     procedure SetOnExecute(Value: TNotifyEvent); virtual;
     property OnChange: TNotifyEvent read FOnChange write FOnChange;

+ 1 - 1
rtl/objpas/classes/collect.inc

@@ -292,7 +292,7 @@ constructor TCollection.Create(AItemClass: TCollectionItemClass);
 begin
   inherited create;
   FItemClass:=AItemClass;
-  FItems:=TList.Create;
+  FItems:=TFpList.Create;
 end;
 
 

+ 2 - 2
rtl/objpas/classes/compon.inc

@@ -106,7 +106,7 @@ Procedure TComponent.Insert(AComponent: TComponent);
 
 begin
   If not assigned(FComponents) then
-    FComponents:=TList.Create;
+    FComponents:=TFpList.Create;
   FComponents.Add(AComponent);
   AComponent.FOwner:=Self;
 end;
@@ -561,7 +561,7 @@ begin
   else
     begin
     If not (Assigned(FFreeNotifies)) then
-      FFreeNotifies:=TList.Create;
+      FFreeNotifies:=TFpList.Create;
     If FFreeNotifies.IndexOf(AComponent)=-1 then
       begin
       FFreeNotifies.Add(AComponent);

+ 2 - 2
rtl/objpas/classes/reader.inc

@@ -587,7 +587,7 @@ end;
 
 procedure TReader.BeginReferences;
 begin
-  FLoaded := TList.Create;
+  FLoaded := TFpList.Create;
 end;
 
 procedure TReader.CheckValue(Value: TValueType);
@@ -1423,7 +1423,7 @@ begin
       if Assigned(GlobalLoaded) then
         FLoaded := GlobalLoaded
       else
-        FLoaded := TList.Create;
+        FLoaded := TFpList.Create;
 
       try
         if FLoaded.IndexOf(FRoot) < 0 then