Explorar o código

better default value for result, removed mistaken understanding of CreateInstance

RyanTMontoya hai 1 ano
pai
achega
6adee9c8ea
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Quick.RTTI.Utils.pas

+ 1 - 1
Quick.RTTI.Utils.pas

@@ -88,7 +88,7 @@ var
   rmethod: TRttiMethod;
   rinstype: TRttiInstanceType;
 begin
-  Result := CreateInstance<T>([]);
+  Result := Default(T);
   rtype := fCtx.GetType(TypeInfo(T));
   for rmethod in rtype.GetMethods do
   begin