BaseTools: move PCD size calculation functions to PcdClassObject

move both GetPcdMaxSize and GetPcdSize to the PcdClassObject.
fix MAX_SIZE_TYPE to have int values

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:
Carsey, Jaben
2018-04-28 06:32:32 +08:00
committed by Yonghong Zhu
parent 88252a90d1
commit 5565a8c4d2
6 changed files with 41 additions and 52 deletions

View File

@ -253,7 +253,7 @@ class VAR_CHECK_PCD_VALID_OBJ(object):
def updateStorageWidth(self):
try:
self.StorageWidth = int(MAX_SIZE_TYPE[self.PcdDataType])
self.StorageWidth = MAX_SIZE_TYPE[self.PcdDataType]
except:
self.StorageWidth = 0
self.ValidData = False