Skip to content

Commit

Permalink
fix unnecessary ptr copy in emap
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Aug 26, 2016
1 parent 090ecf7 commit df0c1b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CondFormats/HcalObjects/src/HcalElectronicsMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const HcalElectronicsMap::PrecisionItem* HcalElectronicsMap::findById (unsigned

sortById();

auto ptr = (*mPItemsById.load(std::memory_order_acquire));
auto const& ptr = (*mPItemsById.load(std::memory_order_acquire));
item = std::lower_bound (ptr.begin(), ptr.end(), &target, hcal_impl::LessById());
if (item == ptr.end() || (*item)->mId != fId)
// throw cms::Exception ("Conditions not found") << "Unavailable Electronics map for cell " << fId;
Expand Down Expand Up @@ -93,7 +93,7 @@ const HcalElectronicsMap::TriggerItem* HcalElectronicsMap::findByTrigId (unsigne

sortByTriggerId();

auto ptr = (*mTItemsByTrigId.load(std::memory_order_acquire));
auto const& ptr = (*mTItemsByTrigId.load(std::memory_order_acquire));
item = std::lower_bound (ptr.begin(), ptr.end(), &target, hcal_impl::LessByTrigId());
if (item == (*mTItemsByTrigId).end() || (*item)->mTrigId != fTrigId)
// throw cms::Exception ("Conditions not found") << "Unavailable Electronics map for cell " << fId;
Expand Down

0 comments on commit df0c1b3

Please sign in to comment.