* Micro-optimization. Fix issue #39617

This commit is contained in:
Michaël Van Canneyt 2022-03-08 11:35:24 +01:00
parent 2f28c5596f
commit 2a19e152b7

View File

@ -1476,6 +1476,8 @@ Var
Obj : TObject; Obj : TObject;
Str : String; Str : String;
begin begin
if (CurIndex=NewIndex) then
Exit;
BeginUpdate; BeginUpdate;
Try Try
Obj:=Objects[CurIndex]; Obj:=Objects[CurIndex];
@ -1485,7 +1487,7 @@ begin
InsertObject(NewIndex,Str,Obj); InsertObject(NewIndex,Str,Obj);
finally finally
EndUpdate; EndUpdate;
end; end;
end; end;
function TStrings.Pop: string; function TStrings.Pop: string;