Merge branch 'RemovedStrCopy' into 'main'

LCL: Removed unneeded string copy in LCLProc.TextToShortCutGeneric function

See merge request freepascal.org/lazarus/lazarus!292
This commit is contained in:
Maxim Ganetsky 2024-06-03 22:25:31 +00:00
commit e8ee8c7eb8

View File

@ -716,7 +716,7 @@ var
function HasFront(const Front: string): Boolean;
begin
Result := (Front<>'') and (StartPos+length(Front)-1 <= length(ShortCutText))
and (AnsiStrLIComp(@ShortCutText[StartPos],PChar(Front),Length(Front))=0);
and (AnsiStrLIComp(@ShortCutText[StartPos],@Front[1],Length(Front))=0);
if Result then
inc(StartPos,length(Front));
end;