From: Carsey, Jaben Date: Thu, 29 Mar 2018 00:02:18 +0000 (+0800) Subject: BaseTools: use in to compare single chars X-Git-Tag: edk2-stable201903~2010 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=0a014fba41b631258687f56e630518b54817d062 BaseTools: use in to compare single chars instead if 3 Startswith for single chars, just use in with a list of chars Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py index 8e1a9866e1..320f001500 100644 --- a/BaseTools/Source/Python/Common/Expression.py +++ b/BaseTools/Source/Python/Common/Expression.py @@ -835,7 +835,7 @@ class ValueExpressionEx(ValueExpression): elif Item.startswith('UINT64'): ItemSize = 8 ValueType = 'UINT64' - elif Item.startswith('"') or Item.startswith("'") or Item.startswith('L'): + elif Item[0] in ['"',"'",'L']: ItemSize = 0 ValueType = 'VOID*' else: