From 0a014fba41b631258687f56e630518b54817d062 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Thu, 29 Mar 2018 08:02:18 +0800 Subject: [PATCH] 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 --- BaseTools/Source/Python/Common/Expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.39.2