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

Debugger: Remove some trivial string copies #11908

Merged
merged 5 commits into from Jun 8, 2023

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented Jun 8, 2023

Gets rid of some trivially removable string churn in Update()-related member functions. Most being accidentally passing by value rather than const reference.

Avoids churning string copies when performing updates.
Avoids churning string copies when updating
…e() when necessary

We can move the construction of the Diff instance into the body of the
if statement, so that we only construct this if the condition is true.

While we're at it, we can move the symbol description string into the
instance, getting rid of a copy. The function itself can also be const
qualified.
Allows for avoiding string copies. While we're at it, we can also mark
ConvertTextToBytes as const.
@AdmiralCurtiss AdmiralCurtiss merged commit 0d07eba into dolphin-emu:master Jun 8, 2023
14 checks passed
@lioncash lioncash deleted the strcopy branch June 8, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants