Skip to content

Commit

Permalink
Merge pull request #46998 from smuzaffar/reconstruction-xpog-code-che…
Browse files Browse the repository at this point in the history
…cks1

[RECONSTRUCTION-XPOG] Apply code checks/format
  • Loading branch information
cmsbuild authored Dec 19, 2024
2 parents 3f06ef3 + 835ce30 commit 666efe2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DataFormats/PatCandidates/src/TriggerObjectStandAlone.cc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bool TriggerObjectStandAlone::hasAnyName(const std::string &name, const std::vec
// Empty parts due to
// - wild-card at beginning/end or
// - multiple wild-cards (should be supressed by 'boost::token_compress_on')
if (iName->length() == 0)
if (iName->empty())
continue;
// Search from current index and
// set index to found occurence
Expand All @@ -115,7 +115,7 @@ bool TriggerObjectStandAlone::hasAnyName(const std::string &name, const std::vec
index += iName->length();
}
// Failed, if end of name not reached
if (index < iVec->length() && namePartsVec.back().length() != 0)
if (index < iVec->length() && !namePartsVec.back().empty())
failed = true;
// Match found!
if (!failed)
Expand Down
2 changes: 1 addition & 1 deletion PhysicsTools/PatAlgos/plugins/DeDxEstimatorRekeyer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void DeDxEstimatorRekeyer::produce(edm::StreamID, edm::Event& iEvent, const edm:
auto dedxHitInfoAssociation = std::make_unique<reco::DeDxHitInfoAss>(dedxHitInfoHandle);
reco::DeDxHitInfoAss::Filler filler(*dedxHitInfoAssociation);
auto resultdedxHitColl = std::make_unique<reco::DeDxHitInfoCollection>();
resultdedxHitColl->reserve(pcTrkMap.size() > 0 ? pcTrkMap.size() * pcTrkMap[0].second.size() : 0);
resultdedxHitColl->reserve(!pcTrkMap.empty() ? pcTrkMap.size() * pcTrkMap[0].second.size() : 0);
std::vector<std::vector<float>> momenta;
momenta.reserve(resultdedxHitColl->capacity());
// Loop over packed candidates
Expand Down

0 comments on commit 666efe2

Please sign in to comment.