Changeset 383 for Generics


Ignore:
Timestamp:
Jul 9, 2012, 2:35:01 PM (12 years ago)
Author:
chronos
Message:
  • Fixed: Comparison in TGList.IndexOf method doesn't work properly.
File:
1 edited

Legend:

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

    r370 r383  
    292292  Result := Start;
    293293  while (Result < FCount) and
    294   not CompareMem(@FItems[Result], @Item, SizeOf(TGListItem)) do
    295 //  not (CompareByte(FItems[Result], Item, SizeOf(TGListItem)) = 0) do
     294//  not CompareMem(@FItems[Result], @Item, SizeOf(TGListItem)) do
     295  not (CompareByte(FItems[Result], Item, SizeOf(TGListItem)) = 0) do
    296296    Result := Result + 1;
    297297  if Result = FCount then Result := -1;
     
    454454  Result := IndexOf(Item);
    455455  if Result <> -1 then
    456     Delete(Result);
     456    Delete(Result)
     457    else raise Exception.CreateFmt(SItemNotFound, [0]);
    457458end;
    458459
Note: See TracChangeset for help on using the changeset viewer.