Skip to content

Commit

Permalink
simpler ClearLineIndexer
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Jun 21, 2020
1 parent ee0c355 commit 371f593
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions atsynedit/atsynedit_ranges.pas
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,13 @@ procedure TATSynRanges.SetItems(Index: integer; const AValue: TATSynRange);
end;

procedure TATSynRanges.ClearLineIndexer(ALineCount: integer; ASetLenOnly: boolean=false);
var
i: integer;
begin
if not ASetLenOnly then
{
for i:= High(FLineIndexer) downto 0 do
SetLength(FLineIndexer[i], 0);
}
SetLength(FLineIndexer, 0); //it frees old memory? seems yes

SetLength(FLineIndexer, ALineCount);
end;
Expand Down

0 comments on commit 371f593

Please sign in to comment.