From 61f5b77dd5eefe5e92ba89281e95037c8d457a72 Mon Sep 17 00:00:00 2001 From: "Carsey, Jaben" Date: Sat, 28 Apr 2018 06:32:36 +0800 Subject: [PATCH] BaseTools: AutoGen - no need to recompute looping over a list and recomputing the same value has no impact on final value Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py index c9cb77941c..f8fbd06f5c 100644 --- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py +++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py @@ -301,8 +301,7 @@ class DbItemList: for ItemIndex in xrange(Index): Offset += len(self.RawDataList[ItemIndex]) else: - for Datas in self.RawDataList: - Offset = self.ItemSize * Index + Offset = self.ItemSize * Index return Offset