BaseTools: FdfParser refactor to remove a dictionary
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>
Fri, 13 Apr 2018 20:51:34 +0000 (04:51 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Tue, 17 Apr 2018 12:49:54 +0000 (20:49 +0800)
__GetInfStatement() does not use the dict parameter, so remove it
from the API and from all callers.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
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