From 92a4eebb3719ef38139d99ddfe4fa302560f79dd Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Sat, 28 Apr 2018 06:32:35 +0800 Subject: BaseTools: AutoGen - refactor out a useless class this class was never instantiated. the static function was called. save the function, remove the rest. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- .../Source/Python/AutoGen/ValidCheckingInfoObject.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py') diff --git a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py index b491b68f6e..92c8fe2df9 100644 --- a/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py +++ b/BaseTools/Source/Python/AutoGen/ValidCheckingInfoObject.py @@ -295,14 +295,10 @@ class VAR_CHECK_PCD_VALID_RANGE(VAR_CHECK_PCD_VALID_OBJ): self.Length = 5 + len(self.data) * 2 * self.StorageWidth -class VAR_VALID_OBJECT_FACTORY(object): - def __init__(self): - pass - @staticmethod - def Get_valid_object(PcdClass, VarOffset): - if PcdClass.validateranges: - return VAR_CHECK_PCD_VALID_RANGE(VarOffset, PcdClass.validateranges, PcdClass.DatumType) - if PcdClass.validlists: - return VAR_CHECK_PCD_VALID_LIST(VarOffset, PcdClass.validlists, PcdClass.DatumType) - else: - return None +def GetValidationObject(PcdClass, VarOffset): + if PcdClass.validateranges: + return VAR_CHECK_PCD_VALID_RANGE(VarOffset, PcdClass.validateranges, PcdClass.DatumType) + if PcdClass.validlists: + return VAR_CHECK_PCD_VALID_LIST(VarOffset, PcdClass.validlists, PcdClass.DatumType) + else: + return None -- cgit v1.2.3