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

(cherry picked from commit 2457016671)
This commit is contained in:
marcoonthegit 2022-04-18 21:23:10 +02:00
parent 2aa8da16c5
commit b76535ebe4
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

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