synedit: less hints

This commit is contained in:
mattias 2024-03-05 15:37:54 +01:00
parent 4c0096a138
commit 1c135fc40e
6 changed files with 11 additions and 11 deletions

View File

@ -1145,7 +1145,7 @@ end;
function TSynEditStrings.GetPhysicalCharWidths(Line: PChar; LineLen, function TSynEditStrings.GetPhysicalCharWidths(Line: PChar; LineLen,
Index: Integer): TPhysicalCharWidths; Index: Integer): TPhysicalCharWidths;
begin begin
SetLength(Result, LineLen); SetLength(Result{%H-}, LineLen);
if LineLen = 0 then if LineLen = 0 then
exit; exit;
DoGetPhysicalCharWidths(Line, LineLen, Index, @Result[0]); DoGetPhysicalCharWidths(Line, LineLen, Index, @Result[0]);
@ -1202,7 +1202,7 @@ begin
if not (p^ in [#10,#13]) then begin if not (p^ in [#10,#13]) then begin
inc(p); inc(p);
end else begin end else begin
SetLength(s,p-StartPos); SetLength(s{%H-},p-StartPos);
if s<>'' then if s<>'' then
System.Move(StartPos^,s[1],length(s)); System.Move(StartPos^,s[1],length(s));
sl.Add(s); sl.Add(s);

View File

@ -1514,13 +1514,13 @@ begin
GrpLow := FFoldGroup; GrpLow := FFoldGroup;
GrpHigh := FFoldGroup; GrpHigh := FFoldGroup;
end; end;
SetLength(OpenCnt, FGroupCount); SetLength(OpenCnt{%H-}, FGroupCount);
for Grp := 0 to FGroupCount - 1 do for Grp := 0 to FGroupCount - 1 do
OpenCnt[Grp] := 0; OpenCnt[Grp] := 0;
ListCnt := FFoldNodeInfoList.Count; ListCnt := FFoldNodeInfoList.Count;
if ListCnt < 0 then if ListCnt < 0 then
exit; exit;
SetLength(OpenIdx, FGroupCount, ListCnt); SetLength(OpenIdx{%H-}, FGroupCount, ListCnt);
for Grp := GrpLow to GrpHigh do begin for Grp := GrpLow to GrpHigh do begin
(* Filtering group in the loop instead of the list only works, if 0 is the only special group (* Filtering group in the loop instead of the list only works, if 0 is the only special group

View File

@ -591,7 +591,7 @@ begin
TabData.SetLineInfo(Index, 0, False); TabData.SetLineInfo(Index, 0, False);
end else begin end else begin
i := length(Line); i := length(Line);
SetLength(CharWidths, i); SetLength(CharWidths{%H-}, i);
DoGetPhysicalCharWidths(Pchar(Line), i, Index, @CharWidths[0]); DoGetPhysicalCharWidths(Pchar(Line), i, Index, @CharWidths[0]);
Result := 0; Result := 0;
for i := 0 to length(CharWidths)-1 do for i := 0 to length(CharWidths)-1 do

View File

@ -3393,7 +3393,7 @@ begin
exit; exit;
end; end;
SetLength(s, Run - p); SetLength(s{%H-}, Run - p);
move(fLine[p], s[1], Run - p); move(fLine[p], s[1], Run - p);
if FPasDocWordList.IndexOf(LowerCase(s)) >= 0 then begin if FPasDocWordList.IndexOf(LowerCase(s)) >= 0 then begin
Result := fPasDocKeyWordAttri.IsEnabled; Result := fPasDocKeyWordAttri.IsEnabled;
@ -4358,7 +4358,7 @@ var
Len: LongInt; Len: LongInt;
begin begin
Len := Run - fTokenPos; Len := Run - fTokenPos;
SetLength(Result,Len); SetLength(Result{%H-},Len);
if Len>0 then if Len>0 then
System.Move(fLine[fTokenPos],Result[1],Len); System.Move(fLine[fTokenPos],Result[1],Len);
end; end;

View File

@ -192,7 +192,7 @@ var
Len: LongInt; Len: LongInt;
begin begin
Len := fTokenEnd - fTokenPos; Len := fTokenEnd - fTokenPos;
SetLength(Result,Len); SetLength(Result{%H-},Len);
System.Move(fLine[fTokenPos],Result[1],Len); System.Move(fLine[fTokenPos],Result[1],Len);
end; end;

View File

@ -5,11 +5,11 @@ unit SynTextMateSyn;
interface interface
uses uses
Classes, SysUtils, fgl, Math, Classes, SysUtils, fgl,
jsonparser, jsonscanner, fpjson, jsonparser, jsonscanner, fpjson,
// LazUtils // LazUtils
LazFileUtils, LazFileUtils,
Laz2_XMLRead, PList2JSon, Laz2_DOM, LazStringUtils, Laz2_XMLRead, Laz2_DOM, LazStringUtils,
// LazEdit // LazEdit
TextMateGrammar, TextMateGrammar,
// SynEdit // SynEdit
@ -184,7 +184,7 @@ var
i: Integer; i: Integer;
begin begin
GetRange; GetRange;
i := Integer(TSynHighlighterTextMateRangeList(CurrentRanges).Range[Index]); i := {%H-}Integer(TSynHighlighterTextMateRangeList(CurrentRanges).Range[Index]);
if i <> FCurrentRange then if i <> FCurrentRange then
FTextMateGrammar.MainPatternList[i].DecRefCount; FTextMateGrammar.MainPatternList[i].DecRefCount;