Browse Source

* TList<>.Pack() with method pointer parameter already passes Default(T) to the check function, so use R instead of Default(T) in the Pack() overload without method pointer

Sven/Sarah Barth 7 months ago
parent
commit
5d65194777
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/rtl-generics/src/generics.collections.pas

+ 1 - 1
packages/rtl-generics/src/generics.collections.pas

@@ -1803,7 +1803,7 @@ begin
   Pack(
     function(const L, R: T): Boolean
     begin
-      Result := FComparer.Compare(L, Default(T)) = 0;
+      Result := FComparer.Compare(L, R) = 0;
     end);
 end;