@@ -593,8 +593,6 @@ TListBase<T> = class abstract(TCollectionBase<T>)
593593 { $ENDREGION}
594594 function CreateList : IList<T>; virtual ;
595595 public
596- constructor Create; override;
597-
598596 function Add (const item: T): Boolean;
599597
600598 function Remove (const item: T): Boolean;
@@ -836,7 +834,8 @@ function TEnumerableBase.GetIsEmpty: Boolean;
836834constructor TEnumerableBase<T>.Create;
837835begin
838836 inherited Create;
839- fComparer := IComparer<T>(_LookupVtableInfo(giComparer, GetElementType, SizeOf(T)));
837+ if not Assigned(fComparer) then
838+ fComparer := IComparer<T>(_LookupVtableInfo(giComparer, GetElementType, SizeOf(T)));
840839end ;
841840
842841constructor TEnumerableBase<T>.Create(const comparer: IComparer<T>);
@@ -1791,7 +1790,6 @@ function TSourceIterator<T>.GetElementType: PTypeInfo;
17911790constructor TCollectionBase<T>.Create;
17921791begin
17931792 inherited Create;
1794- Pointer(this) := Pointer(PByte(Self) + GetInterfaceEntry(ICollection<T>).IOffset);
17951793 UpdateNotify(Self);
17961794end ;
17971795
@@ -2515,8 +2513,6 @@ constructor TMapBase<TKey, T>.Create;
25152513 inherited Create;
25162514 fOnKeyChanged := TCollectionChangedEventImpl<TKey>.Create;
25172515 fOnValueChanged := TCollectionChangedEventImpl<T>.Create;
2518-
2519- Pointer(this) := Pointer(PByte(Self) + GetInterfaceEntry(IMap<TKey, T>).IOffset);
25202516end ;
25212517
25222518destructor TMapBase<TKey, T>.Destroy;
@@ -2601,12 +2597,6 @@ procedure TMapBase<TKey, T>.ValueChanged(const item: T;
26012597
26022598{ $REGION 'TListBase<T>'}
26032599
2604- constructor TListBase<T>.Create;
2605- begin
2606- inherited Create;
2607- Pointer(this) := Pointer(PByte(Self) + GetInterfaceEntry(IList<T>).IOffset);
2608- end ;
2609-
26102600function TListBase <T>.CreateList: IList<T>;
26112601begin
26122602 Result := TList<T>.Create;
0 commit comments