Changeset 346 for trunk/ItemList.pas


Ignore:
Timestamp:
Dec 25, 2024, 11:04:56 AM (28 hours ago)
Author:
chronos
Message:
  • Fixed: Build on Linux.
  • Modified: Improved internal code structure.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ItemList.pas

    r345 r346  
    184184  while Count < Source.Count do AddItem('');
    185185  for I := 0 to Count - 1 do
    186     TItem(Items[I]).Assign(Source.Items[I]);
     186    Items[I].Assign(Source.Items[I]);
    187187end;
    188188
     
    201201function TItemList<T>.AddItem(Name: string): T;
    202202begin
    203   Result := T.Create;
    204   Result.Name := Name;
     203  Result := CreateItem(Name);
    205204  Result.Id := GetNewId;
    206205  Add(Result);
     
    253252end;
    254253
    255 function TItemList<T>.QueryInterface(constref iid: tguid; out obj): LongInt;
    256   stdcall;
     254function TItemList<T>.QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} iid: tguid; out obj): LongInt;
     255  {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
    257256begin
    258257  Result := 0;
    259258end;
    260259
    261 function TItemList<T>._AddRef: LongInt; stdcall;
     260function TItemList<T>._AddRef: LongInt; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
    262261begin
    263262  Result := 0;
    264263end;
    265264
    266 function TItemList<T>._Release: LongInt; stdcall;
     265function TItemList<T>._Release: LongInt; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
    267266begin
    268267  Result := 0;
Note: See TracChangeset for help on using the changeset viewer.