diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2018-04-28 06:32:36 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-05-04 13:03:07 +0800 |
commit | 61f5b77dd5eefe5e92ba89281e95037c8d457a72 (patch) | |
tree | cea0060233833910d2d734261eb99618b18c620f /BaseTools/Source/Python/AutoGen | |
parent | 92a4eebb3719ef38139d99ddfe4fa302560f79dd (diff) | |
download | edk2-61f5b77dd5eefe5e92ba89281e95037c8d457a72.tar.gz edk2-61f5b77dd5eefe5e92ba89281e95037c8d457a72.tar.bz2 edk2-61f5b77dd5eefe5e92ba89281e95037c8d457a72.zip |
BaseTools: AutoGen - no need to recompute
looping over a list and recomputing the same value has no impact on final value
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenPcdDb.py | 3 |
1 files changed, 1 insertions, 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
|