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

[RFC] Test clang-tidy --checks performance-move-const-arg #29931

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Checks: -*,
,modernize-use-equals-delete,
,modernize-use-nullptr,
,modernize-use-override,
,performance-move-const-arg,
,performance-unnecessary-copy-initialization,
,readability-container-size-empty,
,readability-redundant-string-cstr,
Expand Down
2 changes: 1 addition & 1 deletion Alignment/TrackerAlignment/plugins/MCMisalignmentScaler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void MCMisalignmentScaler::analyze(const edm::Event&, const edm::EventSetup& iSe
(*ideal)->rotation().zz() + scaleFactor * zz_diff}};

const AlignTransform rescaledTransform{rescaledTranslation, rescaledRotation, misaligned->rawId()};
rescaledAlignments.m_align.emplace_back(std::move(rescaledTransform));
rescaledAlignments.m_align.emplace_back(rescaledTransform);
}
}

Expand Down
2 changes: 1 addition & 1 deletion CommonTools/CandUtils/interface/makeCompositeCandidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace helpers {
private:
std::unique_ptr<reco::CompositeCandidate> cmp_;
std::unique_ptr<reco::Candidate> release() {
std::unique_ptr<reco::Candidate> ret(std::move(cmp_.get()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think either of these is correct in this case. It looks like this was supposed to be

return std::unique_ptr<reco::Candidate>(std::move(cmp_));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

clang-tidy doesn't try to correct buggy code, only to preserve the existing behaviour :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC just

return std::move(cmp_);

could be enough.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had wondered if that would work or not.

std::unique_ptr<reco::Candidate> ret(cmp_.get());
cmp_.release();
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion CondFormats/HcalObjects/src/HBHEDarkening.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ float HBHEDarkening::degradation(float intlumi, int ieta, int lay) const {
//accumulate degradation over years
float response = 1.0;
std::string yearForLumi = getYearForLumi(intlumi);
assert(yearForLumi.size());
assert(!yearForLumi.empty());

for (const auto& year : years_) {
response *= degradationYear(year, intlumi, ieta, lay);
Expand Down
2 changes: 1 addition & 1 deletion DQM/SiStripMonitorClient/plugins/SiStripDaqInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void SiStripDaqInfo::bookStatus(DQMStore& dqm_store) {
for (auto const& det : det_types) {
std::string const me_name{"SiStrip_" + det};
SubDetMEs local_mes{dqm_store.bookFloat(me_name), 0};
subDetMEsMap_.emplace(det, std::move(local_mes));
subDetMEsMap_.emplace(det, local_mes);
}
bookedStatus_ = true;
dqm_store.cd();
Expand Down
2 changes: 1 addition & 1 deletion DQMServices/FwkIO/plugins/DQMRootOutputModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void DQMRootOutputModule::openFile(edm::FileBlock const&) {
std::string(),
"DQMRootOutputModule",
description().moduleLabel(),
std::move(guid),
guid,
std::string(),
branchHash.digest().toString(),
std::vector<std::string>());
Expand Down
6 changes: 3 additions & 3 deletions DataFormats/Common/interface/DetSetVectorNew.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ namespace edmNew {
size = rh.size;
return *this;
}
Item(Item&& rh) noexcept : id(std::move(rh.id)), offset(int(rh.offset)), size(std::move(rh.size)) {}
Item(Item&& rh) noexcept : id(rh.id), offset(int(rh.offset)), size(rh.size) {}
Item& operator=(Item&& rh) noexcept {
id = std::move(rh.id);
id = rh.id;
offset = int(rh.offset);
size = std::move(rh.size);
size = rh.size;
return *this;
}

Expand Down
4 changes: 2 additions & 2 deletions DataFormats/Common/interface/ValidHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ namespace edm {
using element_type = T;

ValidHandle() = delete;
ValidHandle(T const* prod, ProductID id) noexcept(false) : product_(prod), id_(std::move(id)) {
ValidHandle(T const* prod, ProductID id) noexcept(false) : product_(prod), id_(id) {
vhhelper::throwIfNotValid(prod);
}

//NOTE: C++ disallows references to null
ValidHandle(T const& prod, ProductID id) noexcept(true) : product_(&prod), id_(std::move(id)) {}
ValidHandle(T const& prod, ProductID id) noexcept(true) : product_(&prod), id_(id) {}
ValidHandle(const ValidHandle<T>&) = default;
ValidHandle<T>& operator=(ValidHandle<T> const& rhs) = default;
~ValidHandle() = default;
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/L1TrackTrigger/src/TTDTC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void TTDTC::setStream(int dtcRegion, int dtcBoard, int dtcChannel, const Stream&
<< "(" << dtcChannel << ") is out of range 0 to " << numOverlappingRegions_ - 1 << ".";
throw exception;
}
streams_[index(dtcRegion, dtcBoard, dtcChannel)] = move(stream);
streams_[index(dtcRegion, dtcBoard, dtcChannel)] = stream;
}

// read one specific stream of TTStubRefs using TFP identifier (region[0-8], channel[0-47])
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/PatCandidates/interface/PackedCandidate.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ namespace pat {
track_(iOther.track_.exchange(nullptr)),
pdgId_(iOther.pdgId_),
qualityFlags_(iOther.qualityFlags_),
pvRefProd_(std::move(iOther.pvRefProd_)),
pvRefProd_(iOther.pvRefProd_),
pvRefKey_(iOther.pvRefKey_),
m_(iOther.m_.exchange(nullptr)),
packedHits_(iOther.packedHits_),
Expand Down
4 changes: 2 additions & 2 deletions DataFormats/PatCandidates/interface/PackedGenParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ namespace pat {
dphi_(iOther.dphi_),
pdgId_(iOther.pdgId_),
charge_(iOther.charge_),
mother_(std::move(iOther.mother_)),
mother_(iOther.mother_),
statusFlags_(iOther.statusFlags_) {
if (iOther.p4c_) {
p4_.store(p4_.exchange(nullptr));
Expand All @@ -126,7 +126,7 @@ namespace pat {
dphi_ = iOther.dphi_;
pdgId_ = iOther.pdgId_;
charge_ = iOther.charge_;
mother_ = std::move(iOther.mother_);
mother_ = iOther.mother_;
statusFlags_ = iOther.statusFlags_;
}
return *this;
Expand Down
11 changes: 5 additions & 6 deletions DataFormats/Provenance/src/ProductProvenance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,22 @@ namespace {
namespace edm {
ProductProvenance::ProductProvenance() : branchID_(), parentageID_() {}

ProductProvenance::ProductProvenance(BranchID bid) : branchID_(std::move(bid)), parentageID_() {}
ProductProvenance::ProductProvenance(BranchID bid) : branchID_(bid), parentageID_() {}

ProductProvenance::ProductProvenance(BranchID bid, ParentageID edid)
: branchID_(std::move(bid)), parentageID_(std::move(edid)) {}
: branchID_(bid), parentageID_(std::move(edid)) {}

ProductProvenance::ProductProvenance(BranchID bid, std::vector<BranchID> const& parents)
: branchID_(std::move(bid)), parentageID_() {
: branchID_(bid), parentageID_() {
Parentage p;
p.setParents(parents);
parentageID_ = p.id();
ParentageRegistry::instance()->insertMapped(p);
}

ProductProvenance::ProductProvenance(BranchID bid, std::vector<BranchID>&& parents)
: branchID_(std::move(bid)), parentageID_() {
ProductProvenance::ProductProvenance(BranchID bid, std::vector<BranchID>&& parents) : branchID_(bid), parentageID_() {
Parentage p;
p.setParents(std::move(parents));
p.setParents(parents);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we need a new setParents function in Parentage which passes the item by value.

Copy link
Contributor Author

@fwyzard fwyzard May 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think std::move is unnecessary here because parents is already a &&.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and setParents takes a const & which would require a copy. I'm going to change Parentage::setParents so moves will work properly with it.

parentageID_ = p.id();
ParentageRegistry::instance()->insertMapped(std::move(p));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ std::shared_ptr<edm::ConditionsInLumiBlock> ConditionDumperInEdm::globalBeginLum
}

void ConditionDumperInEdm::endLuminosityBlockProduce(edm::LuminosityBlock& lumi, edm::EventSetup const& setup) {
lumi.emplace(lumiToken_, std::move(*luminosityBlockCache(lumi.index())));
lumi.emplace(lumiToken_, *luminosityBlockCache(lumi.index()));
}

std::shared_ptr<edm::ConditionsInRunBlock> ConditionDumperInEdm::globalBeginRun(edm::Run const&,
Expand All @@ -52,7 +52,7 @@ void ConditionDumperInEdm::endRunProduce(edm::Run& run, const edm::EventSetup& s
runBlock.BAvgCurrent = sum->m_avg_current;
}

run.emplace(runToken_, std::move(runBlock));
run.emplace(runToken_, runBlock);
}

// ------------ method called to produce the data ------------
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/interface/LuminosityBlockPrincipal.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace edm {

LuminosityBlockNumber_t luminosityBlock() const { return aux().luminosityBlock(); }

void setAux(LuminosityBlockAuxiliary iAux) { aux_ = std::move(iAux); }
void setAux(LuminosityBlockAuxiliary iAux) { aux_ = iAux; }
LuminosityBlockAuxiliary const& aux() const { return aux_; }

RunNumber_t run() const { return aux().run(); }
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/interface/ProductRegistryHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace edm {
};

struct BranchAliasSetter {
BranchAliasSetter(TypeLabelItem& iItem, EDPutToken iToken) : value_(iItem), token_(std::move(iToken)) {}
BranchAliasSetter(TypeLabelItem& iItem, EDPutToken iToken) : value_(iItem), token_(iToken) {}

BranchAliasSetter& setBranchAlias(std::string alias) {
value_.branchAlias_ = std::move(alias);
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/src/Event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ namespace edm {
previousBranchIDs_->assign(gotBranchIDVector.begin(), gotBranchIDVector.end());

Parentage p;
p.setParents(std::move(gotBranchIDVector));
p.setParents(gotBranchIDVector);
*previousParentageId = p.id();
ParentageRegistry::instance()->insertMapped(p);
}
Expand Down
6 changes: 3 additions & 3 deletions FWCore/Framework/src/EventProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1259,11 +1259,11 @@ namespace edm {
unsigned int streamIndex = 0;
for (; streamIndex < preallocations_.numberOfStreams() - 1; ++streamIndex) {
tbb::task::enqueue(*edm::make_functor_task(tbb::task::allocate_root(), [this, streamIndex, h = iHolder]() {
handleNextEventForStreamAsync(std::move(h), streamIndex);
handleNextEventForStreamAsync(h, streamIndex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one I don’t understand

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure either.
Maybe because handleNextEventForStreamAsync(...) takes its first argument by value, so there is no point in moving ?

void handleNextEventForStreamAsync(WaitingTaskHolder iTask, unsigned int iStreamIndex);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(just shooting out dark) Could it be that the check sees that WaitingTaskHolder contains only a pointer, and ignores the code in destructor and and copy/move constructors for its decision?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be 'real bad' if so. Hopefully not.

}));
}
tbb::task::spawn(*edm::make_functor_task(tbb::task::allocate_root(), [this, streamIndex, h = std::move(iHolder)]() {
handleNextEventForStreamAsync(std::move(h), streamIndex);
handleNextEventForStreamAsync(h, streamIndex);
}));
}

Expand Down Expand Up @@ -1734,7 +1734,7 @@ namespace edm {
}));
WaitingTaskHolder afterProcessTask;
if (subProcesses_.empty()) {
afterProcessTask = std::move(finalizeEventTask);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intended to release the task and avoid its lifetime being too long

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WaitingTaskHolder doesn't seem to have an operator=(WaitingTaskHolder&&) ?

WaitingTaskHolder() : m_task(nullptr) {}
explicit WaitingTaskHolder(edm::WaitingTask* iTask) : m_task(iTask) { m_task->increment_ref_count(); }
~WaitingTaskHolder() {
if (m_task) {
doneWaiting(std::exception_ptr{});
}
}
WaitingTaskHolder(const WaitingTaskHolder& iHolder) : m_task(iHolder.m_task) { m_task->increment_ref_count(); }
WaitingTaskHolder(WaitingTaskHolder&& iOther) : m_task(iOther.m_task) { iOther.m_task = nullptr; }
WaitingTaskHolder& operator=(const WaitingTaskHolder& iRHS) {
WaitingTaskHolder tmp(iRHS);
std::swap(m_task, tmp.m_task);
return *this;
}

afterProcessTask = finalizeEventTask;
} else {
//Need to run SubProcesses after schedule has finished
// with the event
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/src/LuminosityBlockProcessingStatus.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace edm {
}
edm::Timestamp const& lastTimestamp() const { return endTime_; }

void setNextSyncValue(IOVSyncValue iValue) { nextSyncValue_ = std::move(iValue); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is OK as the class has nothing useful to move.

void setNextSyncValue(IOVSyncValue iValue) { nextSyncValue_ = iValue; }

const IOVSyncValue nextSyncValue() const { return nextSyncValue_; }

Expand Down
2 changes: 1 addition & 1 deletion FWCore/Framework/src/SubProcess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ namespace edm {
}));
WaitingTaskHolder afterProcessTask;
if (subProcesses_.empty()) {
afterProcessTask = std::move(finalizeEventTask);
afterProcessTask = finalizeEventTask;
} else {
afterProcessTask = WaitingTaskHolder(
make_waiting_task(tbb::task::allocate_root(),
Expand Down
6 changes: 3 additions & 3 deletions FWCore/Utilities/src/InputTag.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ namespace edm {
}

InputTag::InputTag(InputTag&& other)
: label_(std::move(other.label())),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither is what what intended. The move needs to be done using the member data not the member functions.

instance_(std::move(other.instance())),
process_(std::move(other.process())),
: label_(other.label()),
instance_(other.instance()),
process_(other.process()),
typeID_(),
productRegistry_(nullptr),
index_(ProductResolverIndexInvalid),
Expand Down
2 changes: 1 addition & 1 deletion FastSimulation/Tracking/interface/SeedFinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SeedFinder {
std::vector<TrajectorySeedHitCandidate> seedHitCandidates;
for (const FastTrackerRecHit* trackerRecHit : trackerRecHits) {
TrajectorySeedHitCandidate seedHitCandidate(trackerRecHit, _trackerTopology);
seedHitCandidates.push_back(std::move(seedHitCandidate));
seedHitCandidates.push_back(seedHitCandidate);
}
return iterateHits(0, seedHitCandidates, hitIndicesInTree, true);

Expand Down
2 changes: 1 addition & 1 deletion Fireworks/Core/src/FWDialogBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FWLayoutBuilder &FWLayoutBuilder::indent(int left /*= 2*/, int right /* = -1*/)

/** Return the last vertical frame, for more control on the layout. */
TGVerticalFrame *FWLayoutBuilder::verticalFrame(void) {
assert(m_framesStack.size());
assert(!m_framesStack.empty());
return m_framesStack.back();
}

Expand Down
2 changes: 1 addition & 1 deletion GeneratorInterface/Core/plugins/ExternalGeneratorFilter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void ExternalGeneratorFilter::streamEndLuminosityBlockSummary(edm::StreamID iID,
void ExternalGeneratorFilter::globalEndLuminosityBlockProduce(edm::LuminosityBlock& iLuminosityBlock,
edm::EventSetup const&,
GenLumiInfoProduct const* iProduct) const {
iLuminosityBlock.emplace(lumiInfoToken_, std::move(*iProduct));
iLuminosityBlock.emplace(lumiInfoToken_, *iProduct);
}

DEFINE_FWK_MODULE(ExternalGeneratorFilter);
2 changes: 1 addition & 1 deletion Geometry/TrackerCommonData/plugins/DDTECModuleAlgo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void DDTECModuleAlgo::doPos(DDLogicalPart toPos, double x, double y, double z, s
if (rotName == "NULL")
rotName = standardRot;

doPos(move(toPos), parent(), copyNr, x, y, z, rotName, cpv);
doPos(toPos, parent(), copyNr, x, y, z, rotName, cpv);
}

void DDTECModuleAlgo::execute(DDCompactView& cpv) {
Expand Down
2 changes: 1 addition & 1 deletion HeterogeneousCore/CUDACore/src/ScopedContext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace cms::cuda {
ScopedContextAcquire::~ScopedContextAcquire() {
holderHelper_.enqueueCallback(device(), stream());
if (contextState_) {
contextState_->set(device(), std::move(streamPtr()));
contextState_->set(device(), streamPtr());
Copy link
Contributor

@makortel makortel May 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change the code such that the move can become meaningful.

}
}

Expand Down
2 changes: 1 addition & 1 deletion L1Trigger/L1TMuonEndCap/src/PatternRecognition.cc
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void PatternRecognition::process_single_zone(int zone,
// Find max quality code in a given key_zhit
if (max_quality_code < quality_code) {
max_quality_code = quality_code;
tmp_road = std::move(road);
tmp_road = road;
}
} // end if is_lifetime_up

Expand Down
2 changes: 1 addition & 1 deletion RecoBTag/CTagging/src/CharmTagger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CharmTagger::CharmTagger(const edm::ParameterSet &configuration, Tokens tokens)
use_GBRForest_(configuration.getParameter<bool>("useGBRForest")),
use_adaBoost_(configuration.getParameter<bool>("useAdaBoost")),
defaultValueNoTracks_(configuration.getParameter<bool>("defaultValueNoTracks")),
tokens_{std::move(tokens)} {
tokens_{tokens} {
vpset vars_definition = configuration.getParameter<vpset>("variables");
for (auto &var : vars_definition) {
MVAVar mva_var;
Expand Down
2 changes: 1 addition & 1 deletion RecoBTag/Combined/src/CandidateChargeBTagComputer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CandidateChargeBTagComputer::CandidateChargeBTagComputer(const edm::ParameterSet
useAdaBoost_(parameters.getParameter<bool>("useAdaBoost")),
jetChargeExp_(parameters.getParameter<double>("jetChargeExp")),
svChargeExp_(parameters.getParameter<double>("svChargeExp")),
tokens_{std::move(tokens)} {
tokens_{tokens} {
uses(0, "pfImpactParameterTagInfos");
uses(1, "pfInclusiveSecondaryVertexFinderCvsLTagInfos");
uses(2, "softPFMuonsTagInfos");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ CandidateBoostedDoubleSecondaryVertexComputer::CandidateBoostedDoubleSecondaryVe
: edm::FileInPath()),
useGBRForest_(parameters.existsAs<bool>("useGBRForest") ? parameters.getParameter<bool>("useGBRForest") : false),
useAdaBoost_(parameters.existsAs<bool>("useAdaBoost") ? parameters.getParameter<bool>("useAdaBoost") : false),
tokens_{std::move(tokens)} {
tokens_{tokens} {
uses(0, "svTagInfos");

mvaID.reset(new TMVAEvaluator());
Expand Down
2 changes: 1 addition & 1 deletion RecoBTag/SoftLepton/src/ElectronTagger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ElectronTagger::ElectronTagger(const edm::ParameterSet& cfg, Tokens tokens)
: edm::FileInPath()),
m_useGBRForest(cfg.existsAs<bool>("useGBRForest") ? cfg.getParameter<bool>("useGBRForest") : false),
m_useAdaBoost(cfg.existsAs<bool>("useAdaBoost") ? cfg.getParameter<bool>("useAdaBoost") : false),
m_tokens{std::move(tokens)} {
m_tokens{tokens} {
uses("seTagInfos");
mvaID.reset(new TMVAEvaluator());
}
Expand Down
2 changes: 1 addition & 1 deletion RecoBTag/SoftLepton/src/MuonTagger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ MuonTagger::MuonTagger(const edm::ParameterSet& cfg, Tokens tokens)
: edm::FileInPath()),
m_useGBRForest(cfg.existsAs<bool>("useGBRForest") ? cfg.getParameter<bool>("useGBRForest") : false),
m_useAdaBoost(cfg.existsAs<bool>("useAdaBoost") ? cfg.getParameter<bool>("useAdaBoost") : false),
m_tokens{std::move(tokens)} {
m_tokens{tokens} {
uses("smTagInfos");
mvaID.reset(new TMVAEvaluator());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ template <class Provider,
class GenericMVAJetTagComputerWrapper : public GenericMVAJetTagComputer, private Provider {
public:
GenericMVAJetTagComputerWrapper(const edm::ParameterSet &params, Tokens tokens)
: GenericMVAJetTagComputer(params, std::move(tokens)), Provider(params) {
: GenericMVAJetTagComputer(params, tokens), Provider(params) {
uses(0, ti1);
uses(1, ti2);
uses(2, ti3);
Expand All @@ -70,7 +70,7 @@ class GenericMVAJetTagComputerWrapper<Provider, TI1, ti1, TI2, ti2, TI3, ti3, bt
: public GenericMVAJetTagComputer, private Provider {
public:
GenericMVAJetTagComputerWrapper(const edm::ParameterSet &params, Tokens tokens)
: GenericMVAJetTagComputer(params, std::move(tokens)), Provider(params) {
: GenericMVAJetTagComputer(params, tokens), Provider(params) {
uses(0, ti1);
uses(1, ti2);
uses(2, ti3);
Expand All @@ -97,7 +97,7 @@ class GenericMVAJetTagComputerWrapper<Provider,
private Provider {
public:
GenericMVAJetTagComputerWrapper(const edm::ParameterSet &params, Tokens tokens)
: GenericMVAJetTagComputer(params, std::move(tokens)), Provider(params) {
: GenericMVAJetTagComputer(params, tokens), Provider(params) {
uses(0, ti1);
uses(1, ti2);
}
Expand All @@ -123,7 +123,7 @@ class GenericMVAJetTagComputerWrapper<Provider,
private Provider {
public:
GenericMVAJetTagComputerWrapper(const edm::ParameterSet &params, Tokens tokens)
: GenericMVAJetTagComputer(params, std::move(tokens)), Provider(params) {
: GenericMVAJetTagComputer(params, tokens), Provider(params) {
uses(0, ti1);
}

Expand All @@ -148,7 +148,7 @@ class GenericMVAJetTagComputerWrapper<Provider,
private Provider {
public:
GenericMVAJetTagComputerWrapper(const edm::ParameterSet &params, Tokens tokens)
: GenericMVAJetTagComputer(params, std::move(tokens)), Provider(params) {}
: GenericMVAJetTagComputer(params, tokens), Provider(params) {}

protected:
reco::TaggingVariableList taggingVariables(const TagInfoHelper &info) const override {
Expand Down
2 changes: 1 addition & 1 deletion RecoBTau/JetTagComputer/src/GenericMVAJetTagComputer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ GenericMVAJetTagComputer::Tokens::Tokens(const edm::ParameterSet &params, edm::E
}

GenericMVAJetTagComputer::GenericMVAJetTagComputer(const edm::ParameterSet &params, Tokens tokens)
: computerCache_(getCalibrationLabels(params, categorySelector_)), tokens_{std::move(tokens)} {}
: computerCache_(getCalibrationLabels(params, categorySelector_)), tokens_{tokens} {}

GenericMVAJetTagComputer::~GenericMVAJetTagComputer() {}

Expand Down
Loading