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

CAI_Space improvement #267

Merged
merged 4 commits into from
Nov 3, 2018
Merged

CAI_Space improvement #267

merged 4 commits into from
Nov 3, 2018

Conversation

FreeZoneMods
Copy link
Contributor

Get rid of raw pointers in CAI_Space, use smart pointers instead
Make instance of CAI_Space static object (instead of maintaining global raw pointer to it)
Add CEventNotifier class to xrCore
Add events for script engine restarting in CAI_Space
Get rid of hack in CALifeSimulator constructor
Add wrapper classes xr_unique_ptr and xr_shared_ptr (will be useful in case of returning xr_new)
Replace usage of std::unique_ptr to xr_unique_ptr

Raw pointers are changed to unique_ptr's, init() method becomes private, instance of the class becomes static, prohibited copy construction and assignment.
This class can be useful in the other places of the engine. After the refactoring the callback is allowed to unsubscribe himself frm ProcessEvent - it won't cause immediate deleting the callback's instance. Callback will be deleted only after ProcessEvent is completed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants