瀏覽代碼

[rttiUtils] call method fixed

Exilon 4 年之前
父節點
當前提交
e93e5773a1
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      Quick.RTTI.Utils.pas

+ 2 - 3
Quick.RTTI.Utils.pas

@@ -7,7 +7,7 @@
   Author      : Kike Pérez
   Version     : 1.4
   Created     : 09/03/2018
-  Modified    : 14/07/2020
+  Modified    : 05/11/2020
 
   This file is part of QuickLib: https://github.com/exilon/QuickLib
 
@@ -143,7 +143,6 @@ var
   rtype : TRttiType;
   rmethod : TRttiMethod;
   rinstype: TRttiInstanceType;
-  value : TValue;
 begin
   rtype := fCtx.GetType(aObject.ClassInfo);
   for rmethod in rtype.GetMethods do
@@ -151,7 +150,7 @@ begin
     if CompareText(rmethod.Name,aMethodName) = 0 then
     begin
       rinstype := rtype.AsInstance;
-      value := rmethod.Invoke(rinstype.MetaclassType,aParams);
+      Result := rmethod.Invoke(rinstype.MetaclassType,aParams);
     end;
 
   end;