BaseTools: FdfParser refactor to remove a dictionary
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FdfParser.py
index 0427b80b246048a9714d70fb24f89504578afeb3..662c232c86e427f97a7be79284644547ab8c1e31 100644 (file)
@@ -2158,7 +2158,7 @@ class FdfParser:
         self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy())\r
 \r
         while True:\r
-            isInf = self.__GetInfStatement(FvObj, MacroDict = FvObj.DefineVarDict.copy())\r
+            isInf = self.__GetInfStatement(FvObj)\r
             isFile = self.__GetFileStatement(FvObj, MacroDict = FvObj.DefineVarDict.copy())\r
             if not isInf and not isFile:\r
                 break\r
@@ -2423,7 +2423,7 @@ class FdfParser:
         MacroDict.update(AprSectionObj.DefineVarDict)\r
 \r
         while True:\r
-            IsInf = self.__GetInfStatement( AprSectionObj, MacroDict = MacroDict)\r
+            IsInf = self.__GetInfStatement(AprSectionObj)\r
             IsFile = self.__GetFileStatement( AprSectionObj)\r
             if not IsInf and not IsFile:\r
                 break\r
@@ -2486,11 +2486,10 @@ class FdfParser:
     #\r
     #   @param  self        The object pointer\r
     #   @param  Obj         for whom inf statement is got\r
-    #   @param  MacroDict   dictionary used to replace macro\r
     #   @retval True        Successfully find inf statement\r
     #   @retval False       Not able to find inf statement\r
     #\r
-    def __GetInfStatement(self, Obj, ForCapsule=False, MacroDict={}):\r
+    def __GetInfStatement(self, Obj, ForCapsule=False):\r
         ffsInf = self.__ParseInfStatement()\r
         if not ffsInf:\r
             return False\r
@@ -2926,7 +2925,7 @@ class FdfParser:
                 self.__GetAprioriSection(FvObj, MacroDict.copy())\r
 \r
                 while True:\r
-                    IsInf = self.__GetInfStatement(FvObj, MacroDict.copy())\r
+                    IsInf = self.__GetInfStatement(FvObj)\r
                     IsFile = self.__GetFileStatement(FvObj, MacroDict.copy())\r
                     if not IsInf and not IsFile:\r
                         break\r