Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avm2: Implement NetConnection.connect with a null command #11815

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

Aaron1011
Copy link
Member

No description provided.

args: &[Value<'gc>],
) -> Result<Value<'gc>, Error<'gc>> {
let this = this.unwrap();
if let Value::Null = args[0] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be args.get_value(0) with ParametersExt. Also, it is currently theoretically possible for this to be None, but Adrian is planning on fixing that soon.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

args.get_value is defined as self[index], so it does the same thing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason the ParametersExt functions are defined that way is so that it's easy to change/intercept every parameter lookup by changing just the get_value function. Otherwise there's no reason for get_value to be defined.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's true - these are just convenience methods.

@n0samu
Copy link
Member

n0samu commented Jul 6, 2023

Progresses Cardboard Box Assembler (#11921).

@Aaron1011 Aaron1011 force-pushed the net-connection-connect branch from 2d60211 to 9ca0d73 Compare July 6, 2023 05:05
@Aaron1011 Aaron1011 enabled auto-merge (rebase) July 6, 2023 05:05
@Aaron1011 Aaron1011 merged commit c295e3e into ruffle-rs:master Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants