* TStringlist constructor with ownsobjects parameter, Delphi compatible + empty constructor to avoid compiler getting confused

This commit is contained in:
marcoonthegit 2022-04-18 21:23:10 +02:00
parent 143c2ec232
commit 2457016671
2 changed files with 12 additions and 1 deletions

View File

@ -849,8 +849,9 @@ type
procedure InsertItem(Index: Integer; const S: string); virtual;
procedure InsertItem(Index: Integer; const S: string; O: TObject); virtual;
Function DoCompareText(const s1,s2 : string) : PtrInt; override;
public
Constructor Create;
Constructor Create(anOwnsObjects : Boolean);
destructor Destroy; override;
function Add(const S: string): Integer; override;
procedure Clear; override;

View File

@ -1886,6 +1886,16 @@ begin
end;
Constructor TStringList.Create;
begin
inherited Create;
end;
Constructor TStringList.Create(anOwnsObjects : Boolean);
begin
inherited Create;
FOwnsObjects:=anOwnsObjects;
end;
destructor TStringList.Destroy;