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

Fix idm remove #16473

Merged
merged 5 commits into from
Dec 29, 2024
Merged

Fix idm remove #16473

merged 5 commits into from
Dec 29, 2024

Conversation

Megamouse
Copy link
Contributor

@Megamouse Megamouse commented Dec 28, 2024

idm remove calls shared_ptr::exchange with a null_ptr.
This calls the stored object's constructor with null args.
Let's just add an exchange overload for null_ptr

fixes #16457
fixes #16458

@elad335
Copy link
Contributor

elad335 commented Dec 29, 2024

I see, instead, you can fix the definition is_stx_pointer to check for null_,ptr_t as well

idm remove calls shared_ptr::exchange with a null_ptr.
This calls the stored object's constructor with null args.
Let's just add an exchange overload for null_ptr
|| is_instance_of<std::remove_cvref_t<T1>, shared_ptr>::value
|| is_instance_of<std::remove_cvref_t<T1>, single_ptr>::value
|| is_instance_of<std::remove_cvref_t<T1>, atomic_ptr>::value;
|| std::is_same_v<std::remove_cvref_t<T1>, null_ptr_t>;
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to thank C++ gods that std::is_same accepts incomplete types for this ;)

@digant73
Copy link
Contributor

if I can provide a suggestion to help/simplify the user's life on testing/reporting issues, it should be better (when possible as in case of a regression) to provide info about which previous PR broke/changed something that was previously working. It will keep track of the chain of changes helping the users to easily identify the PRs to double check (possibly regressed, not regressed etc.)

@elad335 elad335 merged commit 15f29ee into RPCS3:master Dec 29, 2024
6 of 8 checks passed
@Megamouse
Copy link
Contributor Author

Why are you randomly changing my code?
You don't even know if this works?
This is exactly why we are in these crap situations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants