mirror of https://github.com/acidanthera/audk.git
BaseTools: AutoGen - update to remove duplicate constant value
PCD size by type is shared. just use it. 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
bff747501b
commit
a7360838d7
|
@ -250,16 +250,11 @@ class VAR_CHECK_PCD_VALID_OBJ(object):
|
||||||
self.data = set()
|
self.data = set()
|
||||||
self.ValidData = True
|
self.ValidData = True
|
||||||
self.updateStorageWidth()
|
self.updateStorageWidth()
|
||||||
|
|
||||||
def updateStorageWidth(self):
|
def updateStorageWidth(self):
|
||||||
if self.PcdDataType == TAB_UINT8 or self.PcdDataType == "BOOLEAN":
|
try:
|
||||||
self.StorageWidth = 1
|
self.StorageWidth = int(MAX_SIZE_TYPE[self.PcdDataType])
|
||||||
elif self.PcdDataType == TAB_UINT16:
|
except:
|
||||||
self.StorageWidth = 2
|
|
||||||
elif self.PcdDataType == TAB_UINT32:
|
|
||||||
self.StorageWidth = 4
|
|
||||||
elif self.PcdDataType == TAB_UINT64:
|
|
||||||
self.StorageWidth = 8
|
|
||||||
else:
|
|
||||||
self.StorageWidth = 0
|
self.StorageWidth = 0
|
||||||
self.ValidData = False
|
self.ValidData = False
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue