]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/DecBuildData.py
BaseTools: use set instead of list for a variable to be used with in
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / DecBuildData.py
index 49ef1df4aa76bb8e11e06b70e18fb9a826899f5d..ccd6cc6a3754bff1a4492eac09b9990e22f7066e 100644 (file)
@@ -199,9 +199,9 @@ class DecBuildData(PackageBuildClassObject):
                 if Name not in NameList:\r
                     NameList.append(Name)\r
                 ProtocolDict[Arch, Name] = Guid\r
-            # use sdict to keep the order\r
-            self._Protocols = sdict()\r
-            self._PrivateProtocols = sdict()\r
+            # use OrderedDict to keep the order\r
+            self._Protocols = OrderedDict()\r
+            self._PrivateProtocols = OrderedDict()\r
             for Name in NameList:\r
                 #\r
                 # limit the ARCH to self._Arch, if no self._Arch found, tdict\r
@@ -241,9 +241,9 @@ class DecBuildData(PackageBuildClassObject):
                 if Name not in NameList:\r
                     NameList.append(Name)\r
                 PpiDict[Arch, Name] = Guid\r
-            # use sdict to keep the order\r
-            self._Ppis = sdict()\r
-            self._PrivatePpis = sdict()\r
+            # use OrderedDict to keep the order\r
+            self._Ppis = OrderedDict()\r
+            self._PrivatePpis = OrderedDict()\r
             for Name in NameList:\r
                 #\r
                 # limit the ARCH to self._Arch, if no self._Arch found, tdict\r
@@ -283,9 +283,9 @@ class DecBuildData(PackageBuildClassObject):
                 if Name not in NameList:\r
                     NameList.append(Name)\r
                 GuidDict[Arch, Name] = Guid\r
-            # use sdict to keep the order\r
-            self._Guids = sdict()\r
-            self._PrivateGuids = sdict()\r
+            # use OrderedDict to keep the order\r
+            self._Guids = OrderedDict()\r
+            self._PrivateGuids = OrderedDict()\r
             for Name in NameList:\r
                 #\r
                 # limit the ARCH to self._Arch, if no self._Arch found, tdict\r
@@ -350,7 +350,7 @@ class DecBuildData(PackageBuildClassObject):
                     EdkLogger.error('build', ErrorCode, ExtraData=ErrorInfo, File=self.MetaFile, Line=LineNo)\r
                 LibraryClassSet.add(LibraryClass)\r
                 LibraryClassDict[Arch, LibraryClass] = File\r
-            self._LibraryClasses = sdict()\r
+            self._LibraryClasses = OrderedDict()\r
             for LibraryClass in LibraryClassSet:\r
                 self._LibraryClasses[LibraryClass] = LibraryClassDict[self._Arch, LibraryClass]\r
         return self._LibraryClasses\r
@@ -358,7 +358,7 @@ class DecBuildData(PackageBuildClassObject):
     ## Retrieve PCD declarations\r
     def _GetPcds(self):\r
         if self._Pcds is None:\r
-            self._Pcds = sdict()\r
+            self._Pcds = OrderedDict()\r
             self._Pcds.update(self._GetPcd(MODEL_PCD_FIXED_AT_BUILD))\r
             self._Pcds.update(self._GetPcd(MODEL_PCD_PATCHABLE_IN_MODULE))\r
             self._Pcds.update(self._GetPcd(MODEL_PCD_FEATURE_FLAG))\r
@@ -399,7 +399,7 @@ class DecBuildData(PackageBuildClassObject):
 \r
     ## Retrieve PCD declarations for given type\r
     def _GetPcd(self, Type):\r
-        Pcds = sdict()\r
+        Pcds = OrderedDict()\r
         #\r
         # tdict is a special kind of dict, used for selecting correct\r
         # PCD declaration for given ARCH\r