[Lazarus] Dupl. code: ScaleCoord

Alexey aaa5500 at ya.ru
Tue Dec 6 16:48:52 CET 2016


Ondrej

function TControl.ScaleCoord(const ASize: Integer): Integer;
function TControl.ScaleCoord96(const ASize: Integer): Integer;
function TControl.ScaleCoord96Back(const ASize: Integer): Integer;
function TControl.ScaleCoordBack(const ASize: Integer): Integer;

we have 4 almost the same procedures. They all do the same thing:
MulDiv for 2 values (plus if's). It is DUPLICATE code almost.
Wish: add 1 function ScaleCoordMulDiv (if's here) and call it 4 times
in these functions
Alexey


More information about the Lazarus mailing list