mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-28 22:40:30 +02:00
* Add TList.ExtractAt for delphi compatibility
This commit is contained in:
parent
d9903e6e16
commit
b07818e51b
@ -290,6 +290,7 @@ type
|
|||||||
procedure Delete(AIndex: SizeInt); inline;
|
procedure Delete(AIndex: SizeInt); inline;
|
||||||
procedure DeleteRange(AIndex, ACount: SizeInt);
|
procedure DeleteRange(AIndex, ACount: SizeInt);
|
||||||
function ExtractIndex(const AIndex: SizeInt): T; overload;
|
function ExtractIndex(const AIndex: SizeInt): T; overload;
|
||||||
|
Function ExtractAt(const AIndex: SizeInt): T; inline;
|
||||||
function Extract(const AValue: T): T; overload;
|
function Extract(const AValue: T): T; overload;
|
||||||
|
|
||||||
procedure Exchange(AIndex1, AIndex2: SizeInt); virtual;
|
procedure Exchange(AIndex1, AIndex2: SizeInt); virtual;
|
||||||
@ -1749,6 +1750,14 @@ begin
|
|||||||
Result := DoRemove(AIndex, cnExtracted);
|
Result := DoRemove(AIndex, cnExtracted);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TList<T>.ExtractAt(const AIndex: SizeInt): T;
|
||||||
|
begin
|
||||||
|
Result:=ExtractIndex(AIndex);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function TList<T>.Extract(const AValue: T): T;
|
function TList<T>.Extract(const AValue: T): T;
|
||||||
var
|
var
|
||||||
LIndex: SizeInt;
|
LIndex: SizeInt;
|
||||||
|
Loading…
Reference in New Issue
Block a user