mirror of https://github.com/acidanthera/audk.git
BaseTools: AutoGen - refactor assemble_variable
make this function @staticmethod since self parameter is not used. change valuelist to valuedict since it is a dictionary. 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
18011927b1
commit
dea5ef9dc4
|
@ -113,9 +113,10 @@ class VariableMgr(object):
|
|||
indexedvarinfo[key] = [var_info(n.pcdindex,n.pcdname,n.defaultstoragename,n.skuname,n.var_name, n.var_guid, "0x00",n.var_attribute,newvaluestr , newvaluestr , DataType.TAB_VOID)]
|
||||
self.VarInfo = [item[0] for item in indexedvarinfo.values()]
|
||||
|
||||
def assemble_variable(self, valuelist):
|
||||
ordered_offset = sorted(valuelist.keys())
|
||||
ordered_value = [valuelist[k] for k in ordered_offset]
|
||||
@staticmethod
|
||||
def assemble_variable(valuedict):
|
||||
ordered_offset = sorted(valuedict.keys())
|
||||
ordered_value = [valuedict[k] for k in ordered_offset]
|
||||
var_value = []
|
||||
num = 0
|
||||
for offset in ordered_offset:
|
||||
|
@ -126,6 +127,7 @@ class VariableMgr(object):
|
|||
var_value += ordered_value[num]
|
||||
num +=1
|
||||
return var_value
|
||||
|
||||
def process_variable_data(self):
|
||||
|
||||
var_data = collections.defaultdict(collections.OrderedDict)
|
||||
|
|
Loading…
Reference in New Issue