LCLIntf: small optimizations to LParamExtractLoHiWord and LParamHiWord as suggested by Maxim.

This commit is contained in:
Bart 2023-08-27 22:23:12 +02:00
parent b7d3481248
commit ca9f504a0d
3 changed files with 4 additions and 5 deletions

View File

@ -1520,13 +1520,13 @@ end;
}
procedure LParamExtractLoHiWord(const aParam: LPARAM; out LoWord, HiWord: Word);
begin
LoWord := aParam and $FFFF;
HiWord := (aParam and $FFFF0000) shr 16;
LoWord := LParamLoWord(aParam);
HiWord := LParamHiWord(aParam);
end;
function LParamHiWord(const aParam: LPARAM): Word;
begin
Result := (aParam and $FFFF0000) shr 16;
Result := (aParam shr 16) and $FFFF;
end;
function LParamLoWord(const aParam: LPARAM): Word;

View File

@ -336,7 +336,7 @@ function MakeWParam(l, h: Word): WPARAM; inline;
function MakeLParam(l, h: Word): LPARAM; inline;
function MakeLResult(l, h: Word): LRESULT; inline;
procedure LParamExtractLoHiWord(const aParam: LPARAM; out LoWord, HiWord: Word);
procedure LParamExtractLoHiWord(const aParam: LPARAM; out LoWord, HiWord: Word); inline;
function LParamHiWord(const aParam: LPARAM): Word; inline;
function LParamLoWord(const aParam: LPARAM): Word; inline;

View File

@ -1472,7 +1472,6 @@ end;
{ ------------- end message handling ------------}
finalization
if assigned(LDefaultFont) then
LDefaultFont.Free;