From bc5810c9f257d6aecb531611d99ade9ba6395306 Mon Sep 17 00:00:00 2001 From: Alexey-t Date: Thu, 27 Feb 2020 21:11:08 +0300 Subject: [PATCH] optim --- atsynedit/atsynedit_canvasproc.pas | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/atsynedit/atsynedit_canvasproc.pas b/atsynedit/atsynedit_canvasproc.pas index 69fb13533..edbe241ac 100644 --- a/atsynedit/atsynedit_canvasproc.pas +++ b/atsynedit/atsynedit_canvasproc.pas @@ -544,14 +544,12 @@ procedure CanvasTextOut(C: TCanvas; APosX, APosY: integer; AText: atString; if ListInt[i]>AProps.ControlWidth then begin SetLength(AText, i); - break; + Break; end; - for i:= 0 to High(ListInt) do - if i=0 then - Dx[i]:= ListInt[i] - else - Dx[i]:= ListInt[i]-ListInt[i-1]; + Dx[0]:= ListInt[0]; + for i:= 1 to High(ListInt) do + Dx[i]:= ListInt[i]-ListInt[i-1]; end; if AParts=nil then