procedure TControlChildSizing.Assign(Source: TPersistent); has useless duplication of the following code:
FEnlargeHorizontal:=SrcSizing.EnlargeHorizontal;
FEnlargeVertical:=SrcSizing.EnlargeVertical;
FShrinkHorizontal:=SrcSizing.ShrinkHorizontal;
FShrinkVertical:=SrcSizing.ShrinkVertical;
function TControlChildSizing.IsEqual(Sizing: TControlChildSizing): boolean; has useless duplication of the following code:
(FEnlargeHorizontal=Sizing.EnlargeHorizontal)
and (FEnlargeVertical=Sizing.EnlargeVertical)
and (FShrinkHorizontal=Sizing.ShrinkHorizontal)
and (FShrinkVertical=Sizing.ShrinkVertical)
The following patch removes the duplicate code.
diff --git a/lcl/controls.pp b/lcl/controls.pp
index 397076a37a..172b2e1e7f 100644
--- a/lcl/controls.pp
+++ b/lcl/controls.pp
@@ -4033,10 +4033,6 @@ 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 +4057,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)