SynEdit: suppress warnings for "managed local var not initialized" 5091 / Mark SetLength(Result) with {%H-} where needed

This commit is contained in:
Martin 2025-02-23 11:39:35 +01:00
parent 4a1b682e2e
commit 9487a177c5
4 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@
</CodeGeneration>
<Other>
<CompilerMessages>
<IgnoredMessages idx6058="True" idx5024="True" idx4055="True"/>
<IgnoredMessages idx6058="True" idx5091="True" idx5024="True" idx4055="True"/>
</CompilerMessages>
<CustomOptions Value="$(IDEBuildOptions) -CR -dgc"/>
</Other>

View File

@ -478,7 +478,7 @@ begin
ISrc := 1;
DestLen := SrcLen;
IDest := 1;
SetLength(Result, DestLen);
SetLength(Result{%H-}, DestLen);
while ISrc <= SrcLen do begin
c := AToken[ISrc];
IsSpace := IsSpace and (c = ' ');

View File

@ -3128,7 +3128,7 @@ var
i: Integer;
begin
i := FoldOpenCount(ALine);
SetLength(Result, i);
SetLength(Result{%H-}, i);
while i > 0 do begin
dec(i);
Result[i] := InfoForFoldAtTextIndex(ALine, i, False, NeedLen);

View File

@ -960,7 +960,7 @@ var
begin
TCustomSynEdit(FriendEdit).GetHighlighterAttriAtRowColEx(APos, Ctx, FLastContextLine = APos.Y);
FLastContextLine := APos.Y;
SetLength(Result, SizeOf(Integer));
SetLength(Result{%H-}, SizeOf(Integer));
PInteger(@Result[1])^ := Ctx;
end;