mirror of https://github.com/acidanthera/audk.git
BaseTools: Remove the redundant if statement
after analysis the BuildOptionValue function, we found the if statement IsFieldValueAnArray is redundant because ValueExpressionEx will handle it. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
a9ae5b37bf
commit
b2282e5369
|
@ -17,7 +17,7 @@ from __future__ import absolute_import
|
||||||
from Common.GlobalData import *
|
from Common.GlobalData import *
|
||||||
from CommonDataClass.Exceptions import BadExpression
|
from CommonDataClass.Exceptions import BadExpression
|
||||||
from CommonDataClass.Exceptions import WrnExpression
|
from CommonDataClass.Exceptions import WrnExpression
|
||||||
from .Misc import GuidStringToGuidStructureString, ParseFieldValue, IsFieldValueAnArray
|
from .Misc import GuidStringToGuidStructureString, ParseFieldValue
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import copy
|
import copy
|
||||||
from Common.DataType import *
|
from Common.DataType import *
|
||||||
|
@ -138,11 +138,11 @@ def BuildOptionValue(PcdValue, GuidDict):
|
||||||
InputValue = 'L"' + PcdValue[1:] + '"'
|
InputValue = 'L"' + PcdValue[1:] + '"'
|
||||||
else:
|
else:
|
||||||
InputValue = PcdValue
|
InputValue = PcdValue
|
||||||
if IsFieldValueAnArray(InputValue):
|
|
||||||
try:
|
try:
|
||||||
PcdValue = ValueExpressionEx(InputValue, TAB_VOID, GuidDict)(True)
|
PcdValue = ValueExpressionEx(InputValue, TAB_VOID, GuidDict)(True)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return PcdValue
|
return PcdValue
|
||||||
|
|
||||||
## ReplaceExprMacro
|
## ReplaceExprMacro
|
||||||
|
|
Loading…
Reference in New Issue