replaced array of with pointer of integer for 1.0.10

git-svn-id: trunk@6638 -
This commit is contained in:
mattias 2005-01-18 22:35:51 +00:00
parent cc5ecdae5c
commit 03115ff293

View File

@ -148,13 +148,14 @@ var
Lines: TStringList; Lines: TStringList;
AList, AList,
BList: TStringList; BList: TStringList;
Indents: array of Integer; Indents: ^Integer;
X, Y: Integer; X, Y: Integer;
EqPos: Integer; EqPos: Integer;
ALine: String; ALine: String;
begin begin
Lines := TStringList.Create; Lines := TStringList.Create;
SetLength(Indents, ALines.Count); if ALines.Count>0 then begin
GetMem(Indents,SizeOf(Integer)*ALines.Count);
// Put a line on multiple lines, on one line // Put a line on multiple lines, on one line
ALine := ''; ALine := '';
@ -173,6 +174,7 @@ begin
end; end;
ALines.Clear; ALines.Clear;
end;
AList := TStringList.Create; AList := TStringList.Create;
BList := TStringList.Create; BList := TStringList.Create;
@ -194,6 +196,7 @@ begin
BList.Free; BList.Free;
Result := ALines; Result := ALines;
ReAllocMem(Indents,0);
// TODO: How do you stop this from adding a new line at the end of the last item // TODO: How do you stop this from adding a new line at the end of the last item
end; end;
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////