Ignore:
Timestamp:
Apr 8, 2022, 9:43:55 PM (2 years ago)
Author:
chronos
Message:
  • Modified: Use Generics.Collection instead of fgl for better Delphi compatibility.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormFindDuplicity.pas

    r127 r128  
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    7   ExtCtrls, StdCtrls, ActnList, Menus, fgl, UContact;
     7  ExtCtrls, StdCtrls, ActnList, Menus, UContact, Generics.Collections,
     8  Generics.Defaults;
    89
    910type
     
    2021  { TFoundItems }
    2122
    22   TFoundItems = class(TFPGObjectList<TFoundItem>)
     23  TFoundItems = class(TObjectList<TFoundItem>)
    2324    function SearchByField(Field: string): TFoundItem;
    2425  end;
     
    135136end;
    136137
    137 function FoundItemsSort(const Item1, Item2: TFoundItem): Integer;
     138function FoundItemsSort(constref Item1, Item2: TFoundItem): Integer;
    138139begin
    139140  if Item1.Contacts.Count < Item2.Contacts.Count then Result := 1
     
    161162    end;
    162163  end;
    163   FoundItems.Sort(FoundItemsSort);
     164  FoundItems.Sort(TComparer<TFoundItem>.Construct(FoundItemsSort));
    164165  ReloadList;
    165166end;
Note: See TracChangeset for help on using the changeset viewer.