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

PPCSymbolDB: GetDescription by std::string_view #12704

Merged
merged 1 commit into from Apr 15, 2024

Conversation

mitaclaw
Copy link
Contributor

Should save a lot of deep copies.

Should save a lot of deep copies.
@@ -108,13 +108,11 @@ Common::Symbol* PPCSymbolDB::GetSymbolFromAddr(u32 addr)
return nullptr;
}

std::string PPCSymbolDB::GetDescription(u32 addr)
std::string_view PPCSymbolDB::GetDescription(u32 addr)
Copy link
Contributor

@iwubcode iwubcode Apr 13, 2024

Choose a reason for hiding this comment

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

Would be nice if this was const too (and GetSymbolFromAddr)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, PPCSymbolDB and its base class, Common::SymbolDB, lack a lot of const-correctness as technical debt from them being global variables for so many years. I can turn this PR into a general "PPCSymbolDB updates" PR if that's desired, I just saw this as a quick and simple fix to get approved fast.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nah, can be saved for another day. Code as is looks good. Thanks @mitaclaw

@OatmealDome OatmealDome merged commit ab53f69 into dolphin-emu:master Apr 15, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants