From: Jaben Carsey <jaben.carsey@intel.com>
To: edk2-devel@lists.01.org
Cc: Yonghong Zhu <yonghong.zhu@intel.com>, Liming Gao <liming.gao@intel.com>
Subject: [PATCH v1 2/4] BaseTools: remove uncalled function
Date: Thu, 29 Mar 2018 17:19:31 -0700 [thread overview]
Message-ID: <bdd59102cfe09f70808f097f5ac6f1114d5c93f2.1522369072.git.jaben.carsey@intel.com> (raw)
In-Reply-To: <cover.1522369072.git.jaben.carsey@intel.com>
In-Reply-To: <cover.1522369072.git.jaben.carsey@intel.com>
no one calls __IsWhiteSpace() (none of the 4 copies)
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
---
BaseTools/Source/Python/Common/FdfParserLite.py | 15 ---------------
BaseTools/Source/Python/Ecc/CodeFragmentCollector.py | 17 +----------------
BaseTools/Source/Python/Eot/CodeFragmentCollector.py | 17 +----------------
BaseTools/Source/Python/GenFds/FdfParser.py | 15 ---------------
4 files changed, 2 insertions(+), 62 deletions(-)
diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py
index 4638916fab2c..9219cdb1bcce 100644
--- a/BaseTools/Source/Python/Common/FdfParserLite.py
+++ b/BaseTools/Source/Python/Common/FdfParserLite.py
@@ -183,21 +183,6 @@ class FdfParser(object):
self.__WipeOffArea = []
- ## __IsWhiteSpace() method
- #
- # Whether char at current FileBufferPos is whitespace
- #
- # @param self The object pointer
- # @param Char The char to test
- # @retval True The char is a kind of white space
- # @retval False The char is NOT a kind of white space
- #
- def __IsWhiteSpace(self, Char):
- if Char in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB, T_CHAR_LF):
- return True
- else:
- return False
-
## __SkipWhiteSpace() method
#
# Skip white spaces from current char, return number of chars skipped
diff --git a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
index 171600feebf9..fc50eb27a78d 100644
--- a/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
+++ b/BaseTools/Source/Python/Ecc/CodeFragmentCollector.py
@@ -1,7 +1,7 @@
## @file
# preprocess source file
#
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -75,21 +75,6 @@ class CodeFragmentCollector:
self.__Token = ""
self.__SkippedChars = ""
- ## __IsWhiteSpace() method
- #
- # Whether char at current FileBufferPos is whitespace
- #
- # @param self The object pointer
- # @param Char The char to test
- # @retval True The char is a kind of white space
- # @retval False The char is NOT a kind of white space
- #
- def __IsWhiteSpace(self, Char):
- if Char in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB, T_CHAR_LF):
- return True
- else:
- return False
-
## __SkipWhiteSpace() method
#
# Skip white spaces from current char, return number of chars skipped
diff --git a/BaseTools/Source/Python/Eot/CodeFragmentCollector.py b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
index bb78a0f882d5..00668eca3421 100644
--- a/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
+++ b/BaseTools/Source/Python/Eot/CodeFragmentCollector.py
@@ -1,7 +1,7 @@
## @file
# preprocess source file
#
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -73,21 +73,6 @@ class CodeFragmentCollector:
self.__Token = ""
self.__SkippedChars = ""
- ## __IsWhiteSpace() method
- #
- # Whether char at current FileBufferPos is whitespace
- #
- # @param self The object pointer
- # @param Char The char to test
- # @retval True The char is a kind of white space
- # @retval False The char is NOT a kind of white space
- #
- def __IsWhiteSpace(self, Char):
- if Char in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB, T_CHAR_LF):
- return True
- else:
- return False
-
## __SkipWhiteSpace() method
#
# Skip white spaces from current char, return number of chars skipped
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 4dc686922b5a..9cdee358d24e 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -275,21 +275,6 @@ class FdfParser:
if GenFdsGlobalVariable.WorkSpaceDir == '':
GenFdsGlobalVariable.WorkSpaceDir = os.getenv("WORKSPACE")
- ## __IsWhiteSpace() method
- #
- # Whether char at current FileBufferPos is whitespace
- #
- # @param self The object pointer
- # @param Char The char to test
- # @retval True The char is a kind of white space
- # @retval False The char is NOT a kind of white space
- #
- def __IsWhiteSpace(self, Char):
- if Char in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB, T_CHAR_LF):
- return True
- else:
- return False
-
## __SkipWhiteSpace() method
#
# Skip white spaces from current char, return number of chars skipped
--
2.16.2.windows.1
next prev parent reply other threads:[~2018-03-30 0:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 0:19 [PATCH v1 0/4] BaseTools: remove un-needed code Jaben Carsey
2018-03-30 0:19 ` [PATCH v1 1/4] BaseTools: change hex parsing to use built in Jaben Carsey
2018-03-30 0:19 ` Jaben Carsey [this message]
2018-03-30 0:19 ` [PATCH v1 3/4] BaseTools: make static functions when self is not needed Jaben Carsey
2018-03-30 0:19 ` [PATCH v1 4/4] BaseTools: remove uncalled functions Jaben Carsey
2018-04-03 9:26 ` [PATCH v1 0/4] BaseTools: remove un-needed code Zhu, Yonghong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bdd59102cfe09f70808f097f5ac6f1114d5c93f2.1522369072.git.jaben.carsey@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox