mirror of https://github.com/acidanthera/audk.git
BaseTools: AutoGen - refactor function to remove extra variables
we dont need to keep data we already have in different formats... 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>
This commit is contained in:
parent
d3054be59e
commit
1549328f5f
|
@ -110,17 +110,14 @@ class VariableMgr(object):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def assemble_variable(valuedict):
|
def assemble_variable(valuedict):
|
||||||
ordered_offset = sorted(valuedict.keys())
|
ordered_valuedict_keys = sorted(valuedict.keys())
|
||||||
ordered_value = [valuedict[k] for k in ordered_offset]
|
|
||||||
var_value = []
|
var_value = []
|
||||||
num = 0
|
for current_valuedict_key in ordered_valuedict_keys:
|
||||||
for offset in ordered_offset:
|
if current_valuedict_key < len(var_value):
|
||||||
if offset < len(var_value):
|
|
||||||
raise
|
raise
|
||||||
for _ in xrange(offset - len(var_value)):
|
for _ in xrange(current_valuedict_key - len(var_value)):
|
||||||
var_value.append('0x00')
|
var_value.append('0x00')
|
||||||
var_value += ordered_value[num]
|
var_value += valuedict[current_valuedict_key]
|
||||||
num +=1
|
|
||||||
return var_value
|
return var_value
|
||||||
|
|
||||||
def process_variable_data(self):
|
def process_variable_data(self):
|
||||||
|
|
Loading…
Reference in New Issue