Browse Source

better default value for result, removed mistaken understanding of CreateInstance

RyanTMontoya 1 year ago
parent
commit
6adee9c8ea
1 changed files with 1 additions and 1 deletions
  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