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
[RFC] Test clang-tidy --checks modernize-make-unique #29934
Conversation
The code-checks are being triggered in jenkins. |
-note |
+1 |
@@ -109,7 +111,7 @@ HLTInfo::HLTInfo(edm::ParameterSet const& pset, edm::ConsumesCollector&& iC, T& | |||
|
|||
template <typename T> | |||
HLTInfo::HLTInfo(edm::ParameterSet const& pset, edm::ConsumesCollector& iC, T& module) : HLTInfo() { | |||
hltPrescaleProvider_.reset(new HLTPrescaleProvider(pset, iC, module)); | |||
hltPrescaleProvider_ = std::make_unique<HLTPrescaleProvider>(pset, iC, module); |
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.
What happened to the call to method reset()?
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.
reset()
releases the old pointed-to object and takes ownership of a new one; assigning a new unique_ptr
has the same effect
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.
thanks...
+1 |
+upgrade |
See the description at https://clang.llvm.org/extra/clang-tidy/checks/modernize-make-unique.html .