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
Mostly memory management #2
Conversation
- Remove all owning raw pointers - Replace all calls to new with make_unique - Use CRTP for generating Clone method
Dependant name lookup is a Microsoft extension
@Guekka Please remove "Utils.hpp" and put the changes into "NifUtil.hpp" instead. No need for two util headers. Additionally, don't include "Utils.hpp" in any other header files, we don't want to force the templates on anyone using nifly. If necessary, move GetBlockID to a source file and split the clone stuff into its own header so that you can include it in other headers if necessary. |
- Split Utils.hpp into NifUtil.hpp and CloneInherit.hpp - Avoid include NifUtil in headers
@ousnius Is it good like that? |
hdr.ReplaceBlock(GetBlockID(shape), std::unique_ptr<NiObject>(std::move(bsOptShape))); | ||
UpdateSkinPartitions(bsOptShape.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For review, I suggest looking at each commit individually.
For 05db039 (memory management), I suggest you do not look at the headers. It's only noise, the real changes are in the source files
Going to test the changes soon