Packager: Simplify TLPKInfo.Create.

git-svn-id: trunk@56453 -
This commit is contained in:
juha 2017-11-21 12:02:34 +00:00
parent a35f61c6ec
commit 36f3f671b6
2 changed files with 5 additions and 10 deletions

View File

@ -89,7 +89,7 @@ type
PkgType: TLazPackageType; // design, runtime
procedure Assign(Source: TObject);
constructor Create(TheID: TLazPackageID; CreateNewID: boolean);
constructor Create(TheID: TLazPackageID);
destructor Destroy; override;
end;
@ -240,7 +240,7 @@ begin
// new info
ID:=TLazPackageID.Create;
ID.Name:=ExtractFileNameOnly(CurFilename);
Info:=TLPKInfo.Create(ID,false);
Info:=TLPKInfo.Create(ID);
Info.LPKFilename:=CurFilename;
Info.InLazSrc:=FileIsInPath(Info.LPKFilename,
EnvironmentOptions.GetParsedLazarusDirectory);
@ -629,14 +629,9 @@ end;
{ TLPKInfo }
constructor TLPKInfo.Create(TheID: TLazPackageID; CreateNewID: boolean);
constructor TLPKInfo.Create(TheID: TLazPackageID);
begin
if CreateNewID then begin
ID:=TLazPackageID.Create;
ID.AssignID(TheID);
end else begin
ID:=TheID;
end;
ID:=TheID;
end;
procedure TLPKInfo.Assign(Source: TObject);

View File

@ -476,7 +476,7 @@ end;
constructor TPkgLinkInfo.Create;
begin
inherited Create;
FLPKInfo:=TLPKInfo.Create(TLazPackageID.Create,false);
FLPKInfo:=TLPKInfo.Create(TLazPackageID.Create);
end;
destructor TPkgLinkInfo.Destroy;