浏览代码

better default value for result, removed mistaken understanding of CreateInstance

RyanTMontoya 1 年之前
父节点
当前提交
6adee9c8ea
共有 1 个文件被更改,包括 1 次插入1 次删除
  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