BaseTools: FdfParser refactor to remove a dictionary
__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>
This commit is contained in:
committed by
Yonghong Zhu
parent
c3dc9d29d1
commit
cdc9b0c296
@ -2158,7 +2158,7 @@ class FdfParser:
|
|||||||
self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy())
|
self.__GetAprioriSection(FvObj, FvObj.DefineVarDict.copy())
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
isInf = self.__GetInfStatement(FvObj, MacroDict = FvObj.DefineVarDict.copy())
|
isInf = self.__GetInfStatement(FvObj)
|
||||||
isFile = self.__GetFileStatement(FvObj, MacroDict = FvObj.DefineVarDict.copy())
|
isFile = self.__GetFileStatement(FvObj, MacroDict = FvObj.DefineVarDict.copy())
|
||||||
if not isInf and not isFile:
|
if not isInf and not isFile:
|
||||||
break
|
break
|
||||||
@ -2423,7 +2423,7 @@ class FdfParser:
|
|||||||
MacroDict.update(AprSectionObj.DefineVarDict)
|
MacroDict.update(AprSectionObj.DefineVarDict)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
IsInf = self.__GetInfStatement( AprSectionObj, MacroDict = MacroDict)
|
IsInf = self.__GetInfStatement(AprSectionObj)
|
||||||
IsFile = self.__GetFileStatement( AprSectionObj)
|
IsFile = self.__GetFileStatement( AprSectionObj)
|
||||||
if not IsInf and not IsFile:
|
if not IsInf and not IsFile:
|
||||||
break
|
break
|
||||||
@ -2486,11 +2486,10 @@ class FdfParser:
|
|||||||
#
|
#
|
||||||
# @param self The object pointer
|
# @param self The object pointer
|
||||||
# @param Obj for whom inf statement is got
|
# @param Obj for whom inf statement is got
|
||||||
# @param MacroDict dictionary used to replace macro
|
|
||||||
# @retval True Successfully find inf statement
|
# @retval True Successfully find inf statement
|
||||||
# @retval False Not able to find inf statement
|
# @retval False Not able to find inf statement
|
||||||
#
|
#
|
||||||
def __GetInfStatement(self, Obj, ForCapsule=False, MacroDict={}):
|
def __GetInfStatement(self, Obj, ForCapsule=False):
|
||||||
ffsInf = self.__ParseInfStatement()
|
ffsInf = self.__ParseInfStatement()
|
||||||
if not ffsInf:
|
if not ffsInf:
|
||||||
return False
|
return False
|
||||||
@ -2926,7 +2925,7 @@ class FdfParser:
|
|||||||
self.__GetAprioriSection(FvObj, MacroDict.copy())
|
self.__GetAprioriSection(FvObj, MacroDict.copy())
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
IsInf = self.__GetInfStatement(FvObj, MacroDict.copy())
|
IsInf = self.__GetInfStatement(FvObj)
|
||||||
IsFile = self.__GetFileStatement(FvObj, MacroDict.copy())
|
IsFile = self.__GetFileStatement(FvObj, MacroDict.copy())
|
||||||
if not IsInf and not IsFile:
|
if not IsInf and not IsFile:
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user