Browse Source

* Fix compilation with 3.0.4

git-svn-id: trunk@43482 -
michael 5 năm trước cách đây
mục cha
commit
a5d3aabfc2
1 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 7 2
      rtl/objpas/fgl.pp

+ 7 - 2
rtl/objpas/fgl.pp

@@ -143,6 +143,7 @@ type
     Type
       TFPGListEnumeratorSpec = specialize TFPGListEnumerator<T>;
     constructor Create;
+
     class Function ItemIsManaged : Boolean; override;
     function Add(const Item: T): Integer; {$ifdef FGLINLINE} inline; {$endif}
     function Extract(const Item: T): T; {$ifdef FGLINLINE} inline; {$endif}
@@ -968,7 +969,11 @@ end;
 
 class function TFPGList.ItemIsManaged: Boolean;
 begin
+{$IFNDEF VER3_0}
   Result:=IsManagedType(T);
+{$ELSE}
+  Result:=True; // Fallback to old behaviour  
+{$ENDIF}
 end;
 
 function TFPGList.GetEnumerator: TFPGListEnumeratorSpec;
@@ -1011,7 +1016,7 @@ var
   i: Integer;
   
 begin
-  if IsManagedType(T) then
+  if ItemIsManaged then
     begin
     Capacity:=Capacity+Source.Count;
     for I := 0 to Source.Count - 1 do
@@ -1023,7 +1028,7 @@ end;
 
 procedure TFPGList.Assign(Source: TFPGList);
 begin
-  if IsManagedType(T) then
+  if ItemIsManaged then
     begin
     Clear;
     AddList(Source);