> There are a lot of identical expressions: > > 38 + _top_space->SetMinimumHeight((_anchor_height - TotalItemHeight) / > 2 + _padding + _corner_radius + _offset_correction); > 39 + _top_space->SetMaximumHeight((_anchor_height - TotalItemHeight) / > 2 + _padding + _corner_radius + _offset_correction); > 40 + > 41 + _bottom_space->SetMinimumHeight((_anchor_height - > TotalItemHeight) / 2 + _padding + _corner_radius); > 42 + _bottom_space->SetMaximumHeight((_anchor_height - > TotalItemHeight) / 2 + _padding + _corner_radius); > > Please only compute each different expression once. Like... > > int b = (_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius; > int t = b + _offset_correction; > _top_space->SetMinimumHeight(t); > _top_space->SetMaximumHeight(t); > _bottom_space->SetMinimumHeight(b); > _bottom_space->SetMaximumHeight(b);
Done.
« Back to merge proposal
> There are a lot of identical expressions: >SetMinimumHeig ht((_anchor_ height - TotalItemHeight) / correction) ; >SetMaximumHeig ht((_anchor_ height - TotalItemHeight) / correction) ; space-> SetMinimumHeigh t((_anchor_ height - space-> SetMaximumHeigh t((_anchor_ height - >SetMinimumHeig ht(t); >SetMaximumHeig ht(t); space-> SetMinimumHeigh t(b); space-> SetMaximumHeigh t(b);
>
> 38 + _top_space-
> 2 + _padding + _corner_radius + _offset_
> 39 + _top_space-
> 2 + _padding + _corner_radius + _offset_
> 40 +
> 41 + _bottom_
> TotalItemHeight) / 2 + _padding + _corner_radius);
> 42 + _bottom_
> TotalItemHeight) / 2 + _padding + _corner_radius);
>
> Please only compute each different expression once. Like...
>
> int b = (_anchor_height - TotalItemHeight) / 2 + _padding + _corner_radius;
> int t = b + _offset_correction;
> _top_space-
> _top_space-
> _bottom_
> _bottom_
Done.