From 656d2539be34ea0ce356857ffd4f9decdf0476b2 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Wed, 11 Apr 2018 09:14:05 -0700 Subject: BaseTools: replace 'UINT8','UINT16','UINT32','UINT64','VOID*' with shared constants. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py') diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py index 92ede7a823..df7a9b889a 100644 --- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py +++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py @@ -1,4 +1,4 @@ -# Copyright (c) 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -19,6 +19,7 @@ from Common.RangeExpression import RangeExpression from Common.Misc import * from StringIO import StringIO from struct import pack +from Common.DataType import * class VAR_CHECK_PCD_VARIABLE_TAB_CONTAINER(object): def __init__(self): @@ -250,13 +251,13 @@ class VAR_CHECK_PCD_VALID_OBJ(object): self.ValidData = True self.updateStorageWidth() def updateStorageWidth(self): - if self.PcdDataType == "UINT8" or self.PcdDataType == "BOOLEAN": + if self.PcdDataType == TAB_UINT8 or self.PcdDataType == "BOOLEAN": self.StorageWidth = 1 - elif self.PcdDataType == "UINT16": + elif self.PcdDataType == TAB_UINT16: self.StorageWidth = 2 - elif self.PcdDataType == "UINT32": + elif self.PcdDataType == TAB_UINT32: self.StorageWidth = 4 - elif self.PcdDataType == "UINT64": + elif self.PcdDataType == TAB_UINT64: self.StorageWidth = 8 else: self.StorageWidth = 0 -- cgit v1.2.3