lcl/lclmessageglue.pas has function LCLSendActivateMsg(const Target: TControl; Active: Word; Minimized: Boolean; ActiveWindow: HWND = 0): PtrInt;
function LCLSendActivateMsg(const Target: TControl; Active: Word; Minimized: Boolean; ActiveWindow: HWND = 0): PtrInt;
var
Mess: TLMActivate;
begin
Result := 0;
FillChar(Mess, SizeOf(Mess), 0);
Mess.Msg := LM_ACTIVATE;
Mess.Active := Active;
Mess.Minimized := Minimized;
Mess.ActiveWindow := ActiveWindow;
Result := DeliverMessage(Target, Mess);
end;
The following patch removes the useless initial "Result := 0;" line.
diff --git a/lcl/lclmessageglue.pas b/lcl/lclmessageglue.pas
index d898741e6e..efabad983f 100644
--- a/lcl/lclmessageglue.pas
+++ b/lcl/lclmessageglue.pas
@@ -163,7 +163,6 @@ function LCLSendActivateMsg(const Target: TControl; Active: Word; Minimized: Boo
var
Mess: TLMActivate;
begin
- Result := 0;
FillChar(Mess, SizeOf(Mess), 0);
Mess.Msg := LM_ACTIVATE;
Mess.Active := Active;