Skip to content

Commit 75569c8

Browse files
committed
a range here too
1 parent af42698 commit 75569c8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

PhysicsTools/PatAlgos/plugins/PATJetCandidatesRekeyer.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,11 @@ void PATJetCandidatesRekeyer::produce(edm::Event &iEvent, edm::EventSetup const
8585
}
8686

8787
// Copy the tag infos
88-
for (TagInfoFwdPtrCollection::const_iterator iinfoBegin = outPtrP->back().tagInfosFwdPtr().begin(),
89-
iinfoEnd = outPtrP->back().tagInfosFwdPtr().end(),
90-
iinfo = iinfoBegin;
91-
iinfo != iinfoEnd;
92-
++iinfo) {
88+
for (const auto &info : outPtrP->back().tagInfosFwdPtr()) {
9389
// Update the "forward" bit of the FwdPtr to point at the new collection.
9490
// ptr to "this" info in the global list
9591
edm::Ptr<reco::BaseTagInfo> outPtr(oh_tagInfosOut, tagInfoIndex);
96-
outPtrP->back().updateFwdTagInfoFwdPtr(iinfo - iinfoBegin, outPtr);
92+
outPtrP->back().updateFwdTagInfoFwdPtr(tagInfoIndex, outPtr);
9793
++tagInfoIndex;
9894
}
9995
}

0 commit comments

Comments
 (0)