From ee791006781e821e1d415f15433bfa95b9e83500 Mon Sep 17 00:00:00 2001 From: Pierre Gondois Date: Wed, 30 Apr 2025 14:59:09 +0200 Subject: BaseTools: Table: Remove unnecessary code Running the vulture tool on the Table folder gave the following report. Remove the unnecessary code. - Table/Table.py:88: unused method 'GenerateID' (60% confidence) - Table/TableDataModel.py:83: unused method 'GetCrossIndex' (60% confidence) - Table/TableEotReport.py:66: unused method 'GetMaxID' (60% confidence) Signed-off-by: Pierre Gondois --- BaseTools/Source/Python/Table/TableDataModel.py | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'BaseTools/Source/Python/Table/TableDataModel.py') diff --git a/BaseTools/Source/Python/Table/TableDataModel.py b/BaseTools/Source/Python/Table/TableDataModel.py index 3855807452..7d1d7ed3db 100644 --- a/BaseTools/Source/Python/Table/TableDataModel.py +++ b/BaseTools/Source/Python/Table/TableDataModel.py @@ -72,19 +72,3 @@ class TableDataModel(Table): Description = Item[0] self.Insert(CrossIndex, Name, Description) EdkLogger.verbose("Initialize table DataModel ... DONE!") - - ## Get CrossIndex - # - # Get a model's cross index from its name - # - # @param ModelName: Name of the model - # @retval CrossIndex: CrossIndex of the model - # - def GetCrossIndex(self, ModelName): - CrossIndex = -1 - SqlCommand = """select CrossIndex from DataModel where name = '""" + ModelName + """'""" - self.Cur.execute(SqlCommand) - for Item in self.Cur: - CrossIndex = Item[0] - - return CrossIndex -- cgit v1.2.3