diff options
author | Carsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben> | 2018-04-04 05:03:07 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-04-08 14:50:17 +0800 |
commit | 6e6d767edf855320e49892e5f8773e0b3394b975 (patch) | |
tree | 9aede336d03b1595fe7f8e11005b6bc35cdaf62b /BaseTools/Source/Python/Workspace/DecBuildData.py | |
parent | 0d8ff45567fd8fc8e89cdfd646f585c4984ec1b1 (diff) | |
download | edk2-6e6d767edf855320e49892e5f8773e0b3394b975.tar.gz edk2-6e6d767edf855320e49892e5f8773e0b3394b975.tar.bz2 edk2-6e6d767edf855320e49892e5f8773e0b3394b975.zip |
BaseTools: use built in OrderedDict instead of custom version.
We dont use any feature added by custom dictionary class.
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>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/DecBuildData.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/DecBuildData.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py index 49ef1df4aa..ccd6cc6a37 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -199,9 +199,9 @@ class DecBuildData(PackageBuildClassObject): if Name not in NameList:
NameList.append(Name)
ProtocolDict[Arch, Name] = Guid
- # use sdict to keep the order
- self._Protocols = sdict()
- self._PrivateProtocols = sdict()
+ # use OrderedDict to keep the order
+ self._Protocols = OrderedDict()
+ self._PrivateProtocols = OrderedDict()
for Name in NameList:
#
# limit the ARCH to self._Arch, if no self._Arch found, tdict
@@ -241,9 +241,9 @@ class DecBuildData(PackageBuildClassObject): if Name not in NameList:
NameList.append(Name)
PpiDict[Arch, Name] = Guid
- # use sdict to keep the order
- self._Ppis = sdict()
- self._PrivatePpis = sdict()
+ # use OrderedDict to keep the order
+ self._Ppis = OrderedDict()
+ self._PrivatePpis = OrderedDict()
for Name in NameList:
#
# limit the ARCH to self._Arch, if no self._Arch found, tdict
@@ -283,9 +283,9 @@ class DecBuildData(PackageBuildClassObject): if Name not in NameList:
NameList.append(Name)
GuidDict[Arch, Name] = Guid
- # use sdict to keep the order
- self._Guids = sdict()
- self._PrivateGuids = sdict()
+ # use OrderedDict to keep the order
+ self._Guids = OrderedDict()
+ self._PrivateGuids = OrderedDict()
for Name in NameList:
#
# limit the ARCH to self._Arch, if no self._Arch found, tdict
@@ -350,7 +350,7 @@ class DecBuildData(PackageBuildClassObject): EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)
LibraryClassSet.add(LibraryClass)
LibraryClassDict[Arch, LibraryClass] = File
- self._LibraryClasses = sdict()
+ self._LibraryClasses = OrderedDict()
for LibraryClass in LibraryClassSet:
self._LibraryClasses[LibraryClass] = LibraryClassDict[self._Arch, LibraryClass]
return self._LibraryClasses
@@ -358,7 +358,7 @@ class DecBuildData(PackageBuildClassObject): ## Retrieve PCD declarations
def _GetPcds(self):
if self._Pcds is None:
- self._Pcds = sdict()
+ self._Pcds = OrderedDict()
self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))
self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))
self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))
@@ -399,7 +399,7 @@ class DecBuildData(PackageBuildClassObject): ## Retrieve PCD declarations for given type
def _GetPcd(self, Type):
- Pcds = sdict()
+ Pcds = OrderedDict()
#
# tdict is a special kind of dict, used for selecting correct
# PCD declaration for given ARCH
|