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

fixed_typemap.hpp: make it a bit fool-proof #9881

Merged
merged 2 commits into from Mar 2, 2021

Conversation

Nekotekina
Copy link
Member

@Nekotekina Nekotekina commented Mar 2, 2021

Require objects in g_fxo (singletons with lifetime equalling emulated process) to be non-copyable (move is still allowed).

I noticed most of them are immovable anyway due to the presence of atomics and mutexes of sorts.
If accidental copy happends, it may be pretty bad with this design since it will be undesired but unnoticed.

Require objects to be non-copyable (move is still allowed).
Change it to 0xE0000000 (SPU demarcation line)
@Megamouse
Copy link
Contributor

Is there an actual error that you are fixing or is this hypothetical ?

@Nekotekina
Copy link
Member Author

I noticed it when making changes to cellMusic, but they were fixed before this PR I believe. Also it's easy to forget to capture reference: auto x = g_fxo->get<y>(); would create a copy without a warning.

@Megamouse
Copy link
Contributor

hmm. well. idk. maybe someone else can review this.

@Megamouse Megamouse removed their request for review March 2, 2021 19:52
@Nekotekina Nekotekina merged commit c71bc25 into RPCS3:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants