Ignore:
Timestamp:
Feb 23, 2016, 10:30:36 PM (9 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Generics/NativeGenerics/Units/GenericList.pas

    r458 r481  
    9696    function GetInternal(Index: TIndex): TItem; override;
    9797    function GetCount: TIndex; override;
    98     function GetCapacity: TIndex;
     98    function GetCapacity: TIndex; virtual;
    9999    procedure SetCount(const AValue: TIndex); override;
    100     procedure SetCapacity(const AValue: TIndex);
     100    procedure SetCapacity(const AValue: TIndex); virtual;
    101101    procedure SetCapacityOptimized(const NewCapacity: TIndex);
    102102    procedure Put(Index: TIndex; const AValue: TItem); override;
     
    115115  TGObjectList<TItem> = class(TGList<TItem>)
    116116  protected
    117     procedure Put(Index: Integer; const AValue: TItem); override;
     117    procedure Put(Index: TIndex; const AValue: TItem); override;
    118118  public
    119119    OwnsObjects: Boolean;
    120120    procedure SetCount(const AValue: TIndex); override;
    121121    function AddNew(NewObject: TItem = nil): TItem;
    122     procedure Delete(const Index: Integer); override;
     122    procedure Delete(const Index: TIndex); override;
    123123    procedure Clear; override;
    124124    procedure Assign(Source: TGAbstractList<TItem>); override;
     
    130130  private
    131131  public
    132     procedure Delete(const Index: Integer); override;
     132    procedure Delete(const Index: TIndex); override;
    133133    procedure Clear; override;
    134134    procedure Assign(Source: TGAbstractList<TItem>); override;
     
    157157    procedure Open;
    158158    procedure Close;
    159     constructor Create;
     159    constructor Create; override;
    160160    destructor Destroy; override;
    161161    property FileName: string read FFileName write SetFileName;
     
    328328end;
    329329
    330 procedure TGObjectList<TItem>.Put(Index: Integer; const AValue: TItem);
     330procedure TGObjectList<TItem>.Put(Index: TIndex; const AValue: TItem);
    331331begin
    332332  if OwnsObjects and Assigned(FItems[Index]) then FItems[Index].Free;
     
    348348end;
    349349
    350 procedure TGObjectList<TItem>.Delete(const Index: Integer);
     350procedure TGObjectList<TItem>.Delete(const Index: TIndex);
    351351begin
    352352  (*if OwnsObjects then begin
     
    383383end;
    384384
    385 procedure TGStringList<TItem>.Delete(const Index: Integer);
     385procedure TGStringList<TItem>.Delete(const Index: TIndex);
    386386begin
    387387  FItems[Index] := '';
     
    720720    end else
    721721    if NewIndex < CurIndex then begin
    722       Temp.AddListPart(Self, CurIndex, ACount);
     722       Temp.AddListPart(Self, CurIndex, ACount);
    723723      CopyItems(NewIndex, NewIndex + ACount, CurIndex - NewIndex);
    724724      ReplaceList(NewIndex, Temp);
Note: See TracChangeset for help on using the changeset viewer.