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

NetPlayClient: Split out OnData() into smaller functions #10102

Merged
merged 2 commits into from Sep 20, 2021

Conversation

lioncash
Copy link
Member

Over time OnData() has become a huge function-long case statement that attempts to manage numerous packet-related behaviors, which makes it a little difficult to reliably ensure certain handling doesn't interfere with another case's. It's also mildly annoying to navigate due to its size.

To make it a little easier to read and find specific behavior, we can break the relevant pieces of code out into their own functions.

Almost all of this change is just code motion

Over time OnData() has become a huge function-long case statement that
attempts to manage numerous packet-related behaviors, which makes it a
little difficult to reliably ensure certain handling doesn't interfere
with another case's. It's also mildly annoying to navigate due to its
size.

To make it a little easier to read and find the specific behavior, we
can break the relevant pieces of code out into their own functions.
In all usage cases, the return value isn't utilized.
Copy link
Member

@leoetlino leoetlino left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @lioncash)

@leoetlino leoetlino merged commit 276ea43 into dolphin-emu:master Sep 20, 2021
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants