BaseTools: eliminate {} from dictionary contructor call

no need to construct 2 dictionaries.

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:29 +08:00 committed by Yonghong Zhu
parent 13d9e0511e
commit 817e36690a
1 changed files with 5 additions and 5 deletions

View File

@ -123,16 +123,16 @@ class StructurePcd(PcdClassObject):
self.StructuredPcdIncludeFile = [] if StructuredPcdIncludeFile is None else StructuredPcdIncludeFile
self.PackageDecs = Packages
self.DefaultStoreName = [default_store]
self.DefaultValues = collections.OrderedDict({})
self.DefaultValues = collections.OrderedDict()
self.PcdMode = None
self.SkuOverrideValues = collections.OrderedDict({})
self.SkuOverrideValues = collections.OrderedDict()
self.FlexibleFieldName = None
self.StructName = None
self.PcdDefineLineNo = 0
self.PkgPath = ""
self.DefaultValueFromDec = ""
self.ValueChain = dict()
self.PcdFieldValueFromComm = collections.OrderedDict({})
self.PcdFieldValueFromComm = collections.OrderedDict()
def __repr__(self):
return self.TypeName
@ -146,9 +146,9 @@ class StructurePcd(PcdClassObject):
self.DefaultValueFromDec = DefaultValue
def AddOverrideValue (self, FieldName, Value, SkuName, DefaultStoreName, FileName="", LineNo=0):
if SkuName not in self.SkuOverrideValues:
self.SkuOverrideValues[SkuName] = collections.OrderedDict({})
self.SkuOverrideValues[SkuName] = collections.OrderedDict()
if DefaultStoreName not in self.SkuOverrideValues[SkuName]:
self.SkuOverrideValues[SkuName][DefaultStoreName] = collections.OrderedDict({})
self.SkuOverrideValues[SkuName][DefaultStoreName] = collections.OrderedDict()
if FieldName in self.SkuOverrideValues[SkuName][DefaultStoreName]:
del self.SkuOverrideValues[SkuName][DefaultStoreName][FieldName]
self.SkuOverrideValues[SkuName][DefaultStoreName][FieldName] = [Value.strip(), FileName, LineNo]