Ignore:
Timestamp:
Jun 13, 2011, 8:21:12 AM (13 years ago)
Author:
george
Message:
  • Modified: DebugLog transformed to component.
  • Fixed: String compare for template generics.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Generic/GenericListString.inc

    r112 r251  
    1818    procedure Clear; override;
    1919    procedure Assign(Source: TGList); override;
     20    function IndexOf(Item: TGListItem; Start: TGListIndex = 0): TGListIndex; override;
    2021    constructor Create;
    2122    destructor Destroy; override;
     
    7172end;
    7273
     74function TGListString.IndexOf(Item: TGListItem; Start: TGListIndex): TGListIndex;
     75begin
     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;
     81end;
     82
    7383constructor TGListString.Create;
    7484begin
Note: See TracChangeset for help on using the changeset viewer.