avm2: Rename `resolve_parameter_value` to `resolve_parameter`

This commit is contained in:
David Wendt 2021-06-19 14:32:42 -04:00
parent 9e997e6571
commit a60a499f31
1 changed files with 3 additions and 8 deletions

View File

@ -198,7 +198,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
/// configuration, return what value should be stored in the called /// configuration, return what value should be stored in the called
/// function's local registers (or an error, if the parameter violates the /// function's local registers (or an error, if the parameter violates the
/// signature of the current called method). /// signature of the current called method).
fn resolve_parameter_value( fn resolve_parameter(
&mut self, &mut self,
method_name: &str, method_name: &str,
value: Option<&Value<'gc>>, value: Option<&Value<'gc>>,
@ -237,12 +237,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
) -> Result<Vec<Value<'gc>>, Error> { ) -> Result<Vec<Value<'gc>>, Error> {
let mut arguments_list = Vec::new(); let mut arguments_list = Vec::new();
for (i, (arg, param_config)) in user_arguments.iter().zip(signature.iter()).enumerate() { for (i, (arg, param_config)) in user_arguments.iter().zip(signature.iter()).enumerate() {
arguments_list.push(self.resolve_parameter_value( arguments_list.push(self.resolve_parameter(method_name, Some(arg), param_config, i)?);
method_name,
Some(arg),
param_config,
i,
)?);
} }
match user_arguments.len().cmp(&signature.len()) { match user_arguments.len().cmp(&signature.len()) {
@ -255,7 +250,7 @@ impl<'a, 'gc, 'gc_context> Activation<'a, 'gc, 'gc_context> {
Ordering::Less => { Ordering::Less => {
//Apply remaining default parameters //Apply remaining default parameters
for (i, param_config) in signature[user_arguments.len()..].iter().enumerate() { for (i, param_config) in signature[user_arguments.len()..].iter().enumerate() {
arguments_list.push(self.resolve_parameter_value( arguments_list.push(self.resolve_parameter(
method_name, method_name,
None, None,
param_config, param_config,