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

ExpressionParser: Get rid of some redundant copies #12400

Merged
merged 3 commits into from Dec 12, 2023

Conversation

lioncash
Copy link
Member

A few cases were making copies of ControlQualifier instances, which hold 3 strings, so we can be churning memory a little. We can instead pass those by reference or move them instead.

These aren't necessarily cheap to copy, since a control qualifier will
have around 3 std::strings inside of it, so passing by value can churn
allocations a little bit.
Makes for consistency with the surrounding code.
Just some trivial copies that can be eliminated or turned into moves.
@Tilka Tilka merged commit 87b44a2 into dolphin-emu:master Dec 12, 2023
11 checks passed
@lioncash lioncash deleted the expparse branch December 12, 2023 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants