* Small optimization.

git-svn-id: trunk@5304 -
This commit is contained in:
yury 2006-11-10 10:20:38 +00:00
parent 9217d50f5c
commit 677defd615

View File

@ -119,13 +119,12 @@ begin
{ resources aren't case sensitive }
n:=upcase(strpas(resourcename));
searchhash:=HashELF(n);
I:=0;
While (Result=0) and (I<ResInfoCount) do
begin
for i:=0 to ResInfoCount-1 do
if (FPCRuntimeResourceInfoArray[i].reshash=searchhash) and (upcase(FPCRuntimeResourceInfoArray[i].name)=n) then
result:=i+1;
Inc(I);
end;
begin
result:=i+1;
break;
end;
end;
function LoadResource(ModuleHandle: HMODULE; ResHandle: TResourceHandle): HGLOBAL;