-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Use std::make_unique
#2736
Use std::make_unique
#2736
Conversation
PR Summary
|
@mikee47 can you rebase this PR? |
ee236ae
to
13dde4c
Compare
Looking at the Codacy issues: Member variable 'Decompressor::dict' is not initialized in the constructor. Don't care. block of memory gets overwritten. No advantage really in spending time zeroing it out. Condition '!decompressor' is always false That implies
Gives
Raises a fatal I'm changing this PR to WIP as we need to consider this further. |
OK, so the reason why For the Esp8266 at least, |
This PR improves use of
std::unique_ptr
by usingstd::make_unique
where appropriate instead ofreset()
, and also updating some class constructors to use direct assignment.https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#r23-use-make_unique-to-make-unique_ptrs