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: Move instance to PowerPCManager #12630

Merged
merged 1 commit into from Mar 17, 2024

Conversation

mitaclaw
Copy link
Contributor

@mitaclaw mitaclaw commented Mar 10, 2024

PPCSymbolDB is now owned by PowerPC::PowerPCManager, accessible via the GetSymbolDB() getter. Core::System also has a new getter, GetPPCSymbolDB(), which is shorthand for GetPowerPC().GetSymbolDB(). In this PR, care has been taken to access PPCSymbolDB through a PowerPC::PowerPCManager reference whenever possible for efficiency.

In HLE.cpp, the result of SymbolDB::GetSymbolsFromName is returned by value but was being bound to an auto reference, which I felt was misleading even though the lifetime (I think) is extended in this case, so I changed it.

Copy link
Contributor

@AdmiralCurtiss AdmiralCurtiss left a comment

Choose a reason for hiding this comment

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

I see nothing wrong here. There's a few instances where I suspect the PPCSymbolDB isn't const-correct due to being a global before (very easy to overlook that there if your access to it is always non-const...), but that can easily be fixed in a followup if needed.

@AdmiralCurtiss AdmiralCurtiss merged commit 1ee923f into dolphin-emu:master Mar 17, 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
2 participants