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

chore: switch cppscripts to references and unique_ptrs #1689

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jadebenn
Copy link
Collaborator

No description provided.

@EmosewaMC
Copy link
Collaborator

i have some feedback points however mac ci beat me to them. I'd also like to suggest instead making the storage in g_Scripts the unique_ptr that way the only thing that needs to be changed is the body of GetScript with how the new'd script is stored (.reset on a unique_ptr) and how an existing one is returned (.get)

@EmosewaMC
Copy link
Collaborator

alongside this, please make sure each and every script is actually able to be deleted without issue and have its destructor called. These have never had to have this happen and as such those code paths have not been tested ever.

@jadebenn jadebenn self-assigned this Dec 20, 2024
@jadebenn jadebenn added the A-scripts Related to dScripts label Dec 20, 2024
@EmosewaMC
Copy link
Collaborator

EmosewaMC commented Dec 20, 2024

ignore my first feedback about removing all the make_unique, see #1682 for why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-scripts Related to dScripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants