Sfoglia il codice sorgente

* don't use GetTypeData() when ATypeInfo is Nil

git-svn-id: trunk@49063 -
svenbarth 4 anni fa
parent
commit
57e040cb82
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      packages/rtl-generics/src/generics.defaults.pas

+ 3 - 3
packages/rtl-generics/src/generics.defaults.pas

@@ -2163,7 +2163,7 @@ var
   LInstance: PInstance;
   LInstance: PInstance;
 begin
 begin
   if ATypeInfo = nil then
   if ATypeInfo = nil then
-    Exit(SelectBinaryComparer(GetTypeData(ATypeInfo), ASize))
+    Exit(SelectBinaryComparer(Nil, ASize))
   else
   else
   begin
   begin
     LInstance := @ComparerInstances[ATypeInfo.Kind];
     LInstance := @ComparerInstances[ATypeInfo.Kind];
@@ -2279,7 +2279,7 @@ var
   LSelectMethod: TSelectMethod;
   LSelectMethod: TSelectMethod;
 begin
 begin
   if ATypeInfo = nil then
   if ATypeInfo = nil then
-    Exit(SelectBinaryEqualityComparer(GetTypeData(ATypeInfo), ASize))
+    Exit(SelectBinaryEqualityComparer(Nil, ASize))
   else
   else
   begin
   begin
     LInstance := @FEqualityComparerInstances[ATypeInfo.Kind];
     LInstance := @FEqualityComparerInstances[ATypeInfo.Kind];
@@ -2492,7 +2492,7 @@ var
   LSelectMethod: TSelectMethod;
   LSelectMethod: TSelectMethod;
 begin
 begin
   if ATypeInfo = nil then
   if ATypeInfo = nil then
-    Exit(SelectBinaryEqualityComparer(GetTypeData(ATypeInfo), ASize))
+    Exit(SelectBinaryEqualityComparer(Nil, ASize))
   else
   else
   begin
   begin
     LInstance := @FExtendedEqualityComparerInstances[ATypeInfo.Kind];
     LInstance := @FExtendedEqualityComparerInstances[ATypeInfo.Kind];