LCL: Removed unneeded string copy in LCLProc.TextToShortCutGeneric function

This commit is contained in:
Andrey Zubarev 2024-06-03 22:25:30 +00:00 committed by Maxim Ganetsky
parent fc41ca2ea9
commit 27f3226a53

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;