Skip to content

Commit

Permalink
[collections] fixed older delphi versions compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
exilon committed Aug 5, 2021
1 parent a336e87 commit c7e6129
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Quick.Collections.pas
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{ ***************************************************************************
Copyright (c) 2016-2020 Kike Pérez
Copyright (c) 2016-2021 Kike Pérez
Unit : Quick.Collections
Description : Generic Collections
Author : Kike Pérez
Version : 1.2
Created : 07/03/2020
Modified : 07/04/2020
Modified : 05/08/2021
This file is part of QuickLib: https://github.com/exilon/QuickLib
Expand Down Expand Up @@ -286,7 +286,11 @@ function TxList<T>.Extract(const Value: T): T;

function TxList<T>.ExtractAt(Index: Integer): T;
begin
{$If Defined(FPC) OR Defined(DELPHIRX102_UP)}
Result := fList.ExtractAt(Index);
{$ELSE}
Result := fList.Extract(fList[Index]);
{$ENDIF}
end;

function TxList<T>.ExtractItem(const Value: T; Direction: TDirection): T;
Expand Down Expand Up @@ -368,7 +372,11 @@ procedure TxList<T>.InsertRange(Index: Integer; const Collection: TEnumerable<T>

procedure TxList<T>.InsertRange(Index: Integer; const Values: array of T; Count: Integer);
begin
{$If Defined(FPC) OR Defined(DELPHIRX102_UP)}
fList.InsertRange(Index,Values,Count);
{$ELSE}
fList.InsertRange(Index,Values);
{$ENDIF}
end;

procedure TxList<T>.InsertRange(Index: Integer; const Values: array of T);
Expand Down

0 comments on commit c7e6129

Please sign in to comment.