LazUtils: Restore test for HashTableSize>0, needed because HashTableSize is unsigned.

git-svn-id: trunk@48873 -
This commit is contained in:
juha 2015-04-26 21:10:30 +00:00
parent ded4b23a89
commit 414374dbd9

View File

@ -80,18 +80,19 @@ var
begin
Result:=nil;
continue:=True;
for i:=0 to HashTableSize-1 do
if Assigned(Chain(i)) then
if chain(i).Count>0 then
for j:=0 to Chain(i).Count-1 do
begin
aMethod(THTGNode(Chain(i)[j]).Data, THTGNode(Chain(i)[j]).Key, continue);
if not continue then
if HashTableSize>0 then
for i:=0 to HashTableSize-1 do
if Assigned(Chain(i)) then
if chain(i).Count>0 then
for j:=0 to Chain(i).Count-1 do
begin
Result:=THTGNode(Chain(i)[j]);
Exit;
aMethod(THTGNode(Chain(i)[j]).Data, THTGNode(Chain(i)[j]).Key, continue);
if not continue then
begin
Result:=THTGNode(Chain(i)[j]);
Exit;
end;
end;
end;
end;
function TLazFPGHashTable.Iterate(aMethod: TGIteratorMethod): T;