Changeset 316 for trunk/UGameSystem.pas


Ignore:
Timestamp:
Jun 19, 2024, 11:53:06 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGameSystem.pas

    r315 r316  
    11unit UGameSystem;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, fgl, UUnit, DOM, XMLRead, XMLWrite, XML, XMLConf,
     6  Classes, SysUtils, Generics.Collections, UUnit, DOM, XMLRead, XMLWrite, XML, XMLConf,
    97  FileUtil, LazFileUtils, UMapType, UNation, UBuilding;
    108
     
    3937  { TGameSystems }
    4038
    41   TGameSystems = class(TFPGObjectList<TGameSystem>)
     39  TGameSystems = class(TObjectList<TGameSystem>)
    4240    function AddNew(Name: string): TGameSystem;
    4341    function SearchByName(Name: string): TGameSystem;
     
    103101destructor TGameSystem.Destroy;
    104102begin
    105   Nations.Free;
    106   BuildingKinds.Free;
    107   UnitKinds.Free;
    108   inherited Destroy;
     103  FreeAndNil(Nations);
     104  FreeAndNil(BuildingKinds);
     105  FreeAndNil(UnitKinds);
     106  inherited;
    109107end;
    110108
Note: See TracChangeset for help on using the changeset viewer.