Explorar o código

* optimization of TRttiInstanceType.ResolveExtendedDeclaredProperties

Michaël Van Canneyt hai 1 ano
pai
achega
1f19edef00
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/rtl-objpas/src/inc/rtti.pp

+ 1 - 1
packages/rtl-objpas/src/inc/rtti.pp

@@ -6549,7 +6549,6 @@ begin
       if TP^.PropParams <> nil then
       if TP^.PropParams <> nil then
       begin
       begin
         Dec(PropCount);
         Dec(PropCount);
-        SetLength(FDeclaredProperties, PropCount);
         continue;
         continue;
       end;
       end;
       Prop := TRttiProperty(GRttiPool[FUsePublishedOnly].GetByHandle(TP));
       Prop := TRttiProperty(GRttiPool[FUsePublishedOnly].GetByHandle(TP));
@@ -6564,6 +6563,7 @@ begin
       Inc(J);
       Inc(J);
     end;
     end;
   finally
   finally
+    SetLength(FDeclaredProperties, PropCount);
   end;
   end;
 end;
 end;