LCL: Remove duplicate code in TControlChildSizing. Suggested by lagprogramming.

This commit is contained in:
Juha 2023-04-05 01:05:41 +03:00
parent 5913dac8f8
commit 612dd84ec9

View File

@ -4032,11 +4032,6 @@ begin
if Source is TControlChildSizing then begin
SrcSizing:=TControlChildSizing(Source);
if IsEqual(SrcSizing) then exit;
FEnlargeHorizontal:=SrcSizing.EnlargeHorizontal;
FEnlargeVertical:=SrcSizing.EnlargeVertical;
FShrinkHorizontal:=SrcSizing.ShrinkHorizontal;
FShrinkVertical:=SrcSizing.ShrinkVertical;
FEnlargeHorizontal:=SrcSizing.EnlargeHorizontal;
FEnlargeVertical:=SrcSizing.EnlargeVertical;
FShrinkHorizontal:=SrcSizing.ShrinkHorizontal;
@ -4061,10 +4056,6 @@ end;
function TControlChildSizing.IsEqual(Sizing: TControlChildSizing): Boolean;
begin
Result:=(FEnlargeHorizontal=Sizing.EnlargeHorizontal)
and (FEnlargeVertical=Sizing.EnlargeVertical)
and (FShrinkHorizontal=Sizing.ShrinkHorizontal)
and (FShrinkVertical=Sizing.ShrinkVertical)
and (FEnlargeHorizontal=Sizing.EnlargeHorizontal)
and (FEnlargeVertical=Sizing.EnlargeVertical)
and (FShrinkHorizontal=Sizing.ShrinkHorizontal)
and (FShrinkVertical=Sizing.ShrinkVertical)