mirror of https://github.com/acidanthera/audk.git
BaseTools: expression can use single in instead of 3 API calls.
change 3 StartsWith() calls to a single 'in' operation. 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:
parent
56326323e6
commit
663b9e061e
|
@ -991,7 +991,7 @@ class ValueExpressionEx(ValueExpression):
|
|||
Item = '0x%x' % TmpValue if type(TmpValue) != type('') else TmpValue
|
||||
if ItemSize == 0:
|
||||
ItemValue, ItemSize = ParseFieldValue(Item)
|
||||
if not (Item.startswith('"') or Item.startswith('L') or Item.startswith('{')) and ItemSize > 1:
|
||||
if Item[0] not in ['"','L','{'] and ItemSize > 1:
|
||||
raise BadExpression("Byte array number %s should less than 0xFF." % Item)
|
||||
else:
|
||||
ItemValue = ParseFieldValue(Item)[0]
|
||||
|
|
Loading…
Reference in New Issue