Changeset 114 for Generics/TemplateGenerics/Generic/GenericList.inc
- Timestamp:
- Jan 5, 2011, 7:51:16 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Generic/GenericList.inc
r112 r114 3 3 TGList = class; 4 4 5 TGListSortCompare = function( constItem1, Item2: TGListItem): Integer of object;5 TGListSortCompare = function(Item1, Item2: TGListItem): Integer of object; 6 6 TGListToStringConverter = function(Item: TGListItem): string; 7 7 TGListFromStringConverter = function(Text: string): TGListItem; … … 91 91 IncSize := NewCapacity - Capacity; 92 92 // Expand 93 if FCount = Capacitythen begin93 if IncSize = 1 then begin 94 94 IncSize := 4; 95 95 if Capacity > 3 then IncSize := IncSize + 4; 96 96 if Capacity > 8 then IncSize := IncSize + 8; 97 97 if Capacity > 63 then IncSize := IncSize + Capacity shr 2; // Grow by one quarter 98 Capacity := Capacity + IncSize;99 end;98 end; 99 Capacity := Capacity + IncSize; 100 100 end else 101 101 if NewCapacity < Capacity then begin
Note:
See TracChangeset
for help on using the changeset viewer.