Changeset 251 for Generics/TemplateGenerics/Generic/GenericListString.inc
- Timestamp:
- Jun 13, 2011, 8:21:12 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Generic/GenericListString.inc
r112 r251 18 18 procedure Clear; override; 19 19 procedure Assign(Source: TGList); override; 20 function IndexOf(Item: TGListItem; Start: TGListIndex = 0): TGListIndex; override; 20 21 constructor Create; 21 22 destructor Destroy; override; … … 71 72 end; 72 73 74 function TGListString.IndexOf(Item: TGListItem; Start: TGListIndex): TGListIndex; 75 begin 76 Result := Start; 77 while (Result < Count) and 78 (CompareStr(FItems[Result], Item) = -1) do 79 Result := Result + 1; 80 if Result = FCount then Result := -1; 81 end; 82 73 83 constructor TGListString.Create; 74 84 begin
Note:
See TracChangeset
for help on using the changeset viewer.