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

fix unnecessary ptr copy in HcalObjects #16388

Merged
merged 1 commit into from Nov 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions CondFormats/HcalObjects/src/HcalDcsMap.cc
Expand Up @@ -136,7 +136,7 @@ const std::vector<const HcalDcsMap::Item *> HcalDcsMap::findById (unsigned long
sortById();

hcal_impl::LessById lessById;
auto ptr = (*mItemsById.load(std::memory_order_acquire));
auto const& ptr = (*mItemsById.load(std::memory_order_acquire));
item = std::lower_bound (ptr.begin(), ptr.end(), &target, lessById);
if (item == ptr.end() || (*item)->mId != fId){
// throw cms::Exception ("Conditions not found") << "Unavailable Dcs map for cell " << fId;
Expand All @@ -159,7 +159,7 @@ const std::vector<const HcalDcsMap::Item *> HcalDcsMap::findByDcsId (unsigned lo
sortByDcsId();

hcal_impl::LessByDcsId lessByDcsId;
auto ptr = (*mItemsByDcsId.load(std::memory_order_acquire));
auto const& ptr = (*mItemsByDcsId.load(std::memory_order_acquire));
item = std::lower_bound (ptr.begin(), ptr.end(), &target, lessByDcsId);
if (item == ptr.end() || (*item)->mDcsId != fDcsId) {
// throw cms::Exception ("Conditions not found") << "Unavailable Dcs map for cell " << fDcsId;
Expand Down
2 changes: 1 addition & 1 deletion CondFormats/HcalObjects/src/HcalFrontEndMap.cc
Expand Up @@ -46,7 +46,7 @@ const HcalFrontEndMap::PrecisionItem* HcalFrontEndMap::findById (uint32_t fId) c
std::vector<const HcalFrontEndMap::PrecisionItem*>::const_iterator item;

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
2 changes: 1 addition & 1 deletion CondFormats/HcalObjects/src/HcalSiPMCharacteristics.cc
Expand Up @@ -44,7 +44,7 @@ const HcalSiPMCharacteristics::PrecisionItem* HcalSiPMCharacteristics::findByTyp
std::vector<const HcalSiPMCharacteristics::PrecisionItem*>::const_iterator item;

sortByType();
auto ptr = (*mPItemsByType.load(std::memory_order_acquire));
auto const& ptr = (*mPItemsByType.load(std::memory_order_acquire));
item = std::lower_bound (ptr.begin(), ptr.end(), &target, hcal_impl::LessByType());
if (item == ptr.end() || (*item)->type_ != type)
// throw cms::Exception ("Conditions not found") << "Unavailable SiPMCharacteristics for type " << type;
Expand Down