|
@@ -679,7 +679,9 @@ function TFPSList.Expand: TFPSList;
|
|
var
|
|
var
|
|
IncSize : Longint;
|
|
IncSize : Longint;
|
|
begin
|
|
begin
|
|
- if FCount < FCapacity then exit;
|
|
|
|
|
|
+ Result := Self;
|
|
|
|
+ if FCount < FCapacity then
|
|
|
|
+ exit;
|
|
if FCapacity > 127 then
|
|
if FCapacity > 127 then
|
|
IncSize:=FCapacity shr 2
|
|
IncSize:=FCapacity shr 2
|
|
else if FCapacity > 8 then
|
|
else if FCapacity > 8 then
|
|
@@ -692,7 +694,6 @@ begin
|
|
If IncSize<=0 then
|
|
If IncSize<=0 then
|
|
IncSize:=1; // Will trigger error
|
|
IncSize:=1; // Will trigger error
|
|
SetCapacity(FCapacity + IncSize);
|
|
SetCapacity(FCapacity + IncSize);
|
|
- Result := Self;
|
|
|
|
end;
|
|
end;
|
|
|
|
|
|
function TFPSList.GetFirst: Pointer;
|
|
function TFPSList.GetFirst: Pointer;
|