Refactor of TComponent.FindComponent
Original Reporter info from Mantis: Alextp
-
Reporter name: CudaText man
Description:
i suggest small refactor, smaller code.
Function TComponent.FindComponent(const AName: string): TComponent;
Var I : longint;
begin
Result:=Nil;
If (AName='') or Not assigned(FComponents) then exit;
For i:=0 to FComponents.Count-1 do
if SameText(TComponent(FComponents[I]).Name, AName) then
exit(TComponent(FComponents.Items[I]));
end;
Mantis conversion info:
-
Mantis ID: 31628
-
Version: 3.0.1
-
Fixed in version: 3.1.1
-
Fixed in revision: 35946 (#5d317a4e)
-
Monitored by: » Vincent (Vincent Snijders)