Browse Source

pkgutil.pas, exportprocsym:
* use a temporary variable for the procdef
* restructure the if-expression a bit to make it better readable

git-svn-id: branches/svenbarth/packages@32573 -

svenbarth 9 years ago
parent
commit
f686b736f6
1 changed files with 6 additions and 4 deletions
  1. 6 4
      compiler/pkgutil.pas

+ 6 - 4
compiler/pkgutil.pas

@@ -77,20 +77,22 @@ implementation
     var
       i : longint;
       item : TCmdStrListItem;
+      pd : tprocdef;
     begin
       for i:=0 to tprocsym(sym).ProcdefList.Count-1 do
         begin
-          if not(tprocdef(tprocsym(sym).ProcdefList[i]).proccalloption in [pocall_internproc]) and
-              ((tprocdef(tprocsym(sym).ProcdefList[i]).procoptions*[po_external])=[]) and
+          pd:=tprocdef(tprocsym(sym).procdeflist[i]);
+          if not(pd.proccalloption in [pocall_internproc]) and
+              ((pd.procoptions*[po_external])=[]) and
               (
                 (symtable.symtabletype in [globalsymtable,recordsymtable,objectsymtable]) or
                 (
                   (symtable.symtabletype=staticsymtable) and
-                  ([po_public,po_has_public_name]*tprocdef(tprocsym(sym).ProcdefList[i]).procoptions<>[])
+                  ([po_public,po_has_public_name]*pd.procoptions<>[])
                 )
               ) then
             begin
-              exportallprocdefnames(tprocsym(sym),tprocdef(tprocsym(sym).ProcdefList[i]),[]);
+              exportallprocdefnames(tprocsym(sym),pd,[]);
             end;
         end;
     end;