mirror of https://github.com/acidanthera/audk.git
BaseTools: Workspace - refactor a dict
change a dict to a set since we never examine the contents, just the keys. 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
8ac64c5b12
commit
88252a90d1
|
@ -136,7 +136,7 @@ class StructurePcd(PcdClassObject):
|
|||
self.PcdDefineLineNo = 0
|
||||
self.PkgPath = ""
|
||||
self.DefaultValueFromDec = ""
|
||||
self.ValueChain = dict()
|
||||
self.ValueChain = set()
|
||||
self.PcdFieldValueFromComm = collections.OrderedDict()
|
||||
def __repr__(self):
|
||||
return self.TypeName
|
||||
|
|
|
@ -1347,7 +1347,7 @@ class DscBuildData(PlatformBuildClassObject):
|
|||
nextskuid = self.SkuIdMgr.GetNextSkuId(nextskuid)
|
||||
stru_pcd.SkuOverrideValues[skuid] = copy.deepcopy(stru_pcd.SkuOverrideValues[nextskuid]) if not NoDefault else copy.deepcopy({defaultstorename: stru_pcd.DefaultValues for defaultstorename in DefaultStores} if DefaultStores else {TAB_DEFAULT_STORES_DEFAULT:stru_pcd.DefaultValues})
|
||||
if not NoDefault:
|
||||
stru_pcd.ValueChain[(skuid,'')]= (nextskuid,'')
|
||||
stru_pcd.ValueChain.add(skuid,'')
|
||||
if stru_pcd.Type in [self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_HII], self._PCD_TYPE_STRING_[MODEL_PCD_DYNAMIC_EX_HII]]:
|
||||
for skuid in SkuIds:
|
||||
nextskuid = skuid
|
||||
|
@ -1366,7 +1366,7 @@ class DscBuildData(PlatformBuildClassObject):
|
|||
for defaultstoreid in DefaultStores:
|
||||
if defaultstoreid not in stru_pcd.SkuOverrideValues[skuid]:
|
||||
stru_pcd.SkuOverrideValues[skuid][defaultstoreid] = copy.deepcopy(stru_pcd.SkuOverrideValues[nextskuid][mindefaultstorename])
|
||||
stru_pcd.ValueChain[(skuid,defaultstoreid)]= (nextskuid,mindefaultstorename)
|
||||
stru_pcd.ValueChain.add(skuid,defaultstoreid)
|
||||
S_pcd_set = DscBuildData.OverrideByFdfComm(S_pcd_set)
|
||||
Str_Pcd_Values = self.GenerateByteArrayValue(S_pcd_set)
|
||||
if Str_Pcd_Values:
|
||||
|
|
Loading…
Reference in New Issue