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
Have TkCloner return std::unique_ptr for factory functions #5173
Conversation
This file provides an easy way to hide the details of std::unique_ptr from ROOT while still being able to use that class as a return type for member functions parsed by ROOT. This will be unnecessary when we switch to ROOT 6.
The static analyzer was complaining about TkCloner returning non-const pointers from functions. These functions were purely factory methods so the complaints were not justified. However, the best way to silence those complaints was to change the return type to std::unique_ptr since this enforces the ownership transfer which was merely implicit in the previous API.
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_2_X. Have TkCloner return std::unique_ptr for factory functions It involves the following packages: DataFormats/TrackerRecHit2D @nclopezo, @cmsbuild, @Dr15Jones, @StoyanStoynev, @slava77, @ktf can you please review it and eventually sign? Thanks. |
+1 |
+1. thanks Chris. Tracking POG will try to review all static analyzer issues and fix them. (for 73?) |
@cmsbuild can the tests be run? |
+1 |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_2_X IBs unless changes (tests are also fine). |
Have TkCloner return std::unique_ptr for factory functions
The static analyzer was complaining about TkCloner returning
non-const pointers from functions. These functions were purely
factory methods so the complaints were not justified. However,
the best way to silence those complaints was to change the return
type to std::unique_ptr since this enforces the ownership transfer
which was merely implicit in the previous API.