From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5E4F7208F7CB5 for ; Fri, 17 Aug 2018 09:17:42 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Aug 2018 09:17:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,251,1531810800"; d="scan'208";a="225489533" Received: from jcarsey-desk1.amr.corp.intel.com ([10.7.159.144]) by orsmga004.jf.intel.com with ESMTP; 17 Aug 2018 09:17:42 -0700 From: Jaben Carsey To: edk2-devel@lists.01.org Cc: Yonghong Zhu , Liming Gao Date: Fri, 17 Aug 2018 09:17:40 -0700 Message-Id: X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: References: Subject: [PATCH v1 1/1] BaseTools: remove unused setter functions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 16:17:42 -0000 Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/Workspace/DecBuildData.py | 17 +---------- BaseTools/Source/Python/Workspace/DscBuildData.py | 17 +---------- BaseTools/Source/Python/Workspace/InfBuildData.py | 30 ++------------------ 3 files changed, 4 insertions(+), 60 deletions(-) diff --git a/BaseTools/Source/Python/Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.py index 7eeca9524529..45beaebc63ef 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -116,21 +116,6 @@ class DecBuildData(PackageBuildClassObject): def _GetArch(self): return self._Arch - ## Set architecture - # - # Changing the default ARCH to another may affect all other information - # because all information in a platform may be ARCH-related. That's - # why we need to clear all internal used members, in order to cause all - # information to be re-retrieved. - # - # @param Value The value of ARCH - # - def _SetArch(self, Value): - if self._Arch == Value: - return - self._Arch = Value - self._Clear() - ## Retrieve all information in [Defines] section # # (Retriving all [Defines] information in one-shot is just to save time.) @@ -469,7 +454,7 @@ class DecBuildData(PackageBuildClassObject): _Macros = property(_GetMacros) - Arch = property(_GetArch, _SetArch) + Arch = property(_GetArch) PackageName = property(_GetPackageName) Guid = property(_GetFileGuid) Version = property(_GetVersion) diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index c7f07f464646..a4ad53ee1558 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -308,21 +308,6 @@ class DscBuildData(PlatformBuildClassObject): def _GetArch(self): return self._Arch - ## Set architecture - # - # Changing the default ARCH to another may affect all other information - # because all information in a platform may be ARCH-related. That's - # why we need to clear all internal used members, in order to cause all - # information to be re-retrieved. - # - # @param Value The value of ARCH - # - def _SetArch(self, Value): - if self._Arch == Value: - return - self._Arch = Value - self._Clear() - ## Retrieve all information in [Defines] section # # (Retriving all [Defines] information in one-shot is just to save time.) @@ -2849,7 +2834,7 @@ class DscBuildData(PlatformBuildClassObject): self._DecPcds, self._GuidDict = GetDeclaredPcd(self, self._Bdb, self._Arch, self._Target, self._Toolchain, PkgSet) return self._DecPcds _Macros = property(_GetMacros) - Arch = property(_GetArch, _SetArch) + Arch = property(_GetArch) Platform = property(_GetPlatformName) PlatformName = property(_GetPlatformName) Guid = property(_GetFileGuid) diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py index 29e68aeb3bf3..8bff96b14942 100644 --- a/BaseTools/Source/Python/Workspace/InfBuildData.py +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py @@ -173,36 +173,10 @@ class InfBuildData(ModuleBuildClassObject): def _GetArch(self): return self._Arch - ## Set architecture - # - # Changing the default ARCH to another may affect all other information - # because all information in a platform may be ARCH-related. That's - # why we need to clear all internal used members, in order to cause all - # information to be re-retrieved. - # - # @param Value The value of ARCH - # - def _SetArch(self, Value): - if self._Arch == Value: - return - self._Arch = Value - self._Clear() - ## Return the name of platform employing this module def _GetPlatform(self): return self._Platform - ## Change the name of platform employing this module - # - # Changing the default name of platform to another may affect some information - # because they may be PLATFORM-related. That's why we need to clear all internal - # used members, in order to cause all information to be re-retrieved. - # - def _SetPlatform(self, Value): - if self._Platform == Value: - return - self._Platform = Value - self._Clear() def _GetHeaderComments(self): if not self._HeaderComments: self._HeaderComments = [] @@ -1158,8 +1132,8 @@ class InfBuildData(ModuleBuildClassObject): return False _Macros = property(_GetMacros) - Arch = property(_GetArch, _SetArch) - Platform = property(_GetPlatform, _SetPlatform) + Arch = property(_GetArch) + Platform = property(_GetPlatform) HeaderComments = property(_GetHeaderComments) TailComments = property(_GetTailComments) -- 2.16.2.windows.1