mirror of https://github.com/acidanthera/audk.git
BaseTools: minimize assignment processing
Reverse the checking and only assign once to each variable. Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@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
f5f4667dae
commit
a77e5bcac5
|
@ -1534,15 +1534,16 @@ class DscBuildData(PlatformBuildClassObject):
|
|||
PcdValueDict[PcdCName, TokenSpaceGuid] = {SkuName:(PcdValue, DatumType, MaxDatumSize)}
|
||||
|
||||
for ((PcdCName, TokenSpaceGuid), PcdSetting) in PcdValueDict.iteritems():
|
||||
PcdValue = None
|
||||
DatumType = None
|
||||
MaxDatumSize = None
|
||||
if TAB_COMMON in PcdSetting:
|
||||
PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_COMMON]
|
||||
if TAB_DEFAULT in PcdSetting:
|
||||
PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_DEFAULT]
|
||||
if self.SkuIdMgr.SystemSkuId in PcdSetting:
|
||||
PcdValue, DatumType, MaxDatumSize = PcdSetting[self.SkuIdMgr.SystemSkuId]
|
||||
elif TAB_DEFAULT in PcdSetting:
|
||||
PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_DEFAULT]
|
||||
elif TAB_COMMON in PcdSetting:
|
||||
PcdValue, DatumType, MaxDatumSize = PcdSetting[TAB_COMMON]
|
||||
else:
|
||||
PcdValue = None
|
||||
DatumType = None
|
||||
MaxDatumSize = None
|
||||
|
||||
Pcds[PcdCName, TokenSpaceGuid] = PcdClassObject(
|
||||
PcdCName,
|
||||
|
|
Loading…
Reference in New Issue