mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 15:52:05 +02:00
* Fix compilation with 3.0.4
git-svn-id: trunk@43482 -
This commit is contained in:
parent
43a09af7f2
commit
a5d3aabfc2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user