Skip to content

Commit

Permalink
Avoid copying EventSetupRecordImpl
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Mar 19, 2024
1 parent 3f6829b commit aebc73f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FWCore/Framework/interface/EventSetupRecordImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ namespace edm {
std::shared_ptr<ESHandleExceptionFactory>& whyFailedFactory) const {
DataKey const* dataKey = nullptr;
if (iResolverIndex.value() == std::numeric_limits<int>::max()) {
whyFailedFactory = makeESHandleExceptionFactory([=, *this] {
NoProductResolverException<DataT> ex(this->key(), {});
whyFailedFactory = makeESHandleExceptionFactory([=, key=this->key()] {
NoProductResolverException<DataT> ex(key, {});
return std::make_exception_ptr(ex);
});
iData = nullptr;
Expand All @@ -178,8 +178,8 @@ namespace edm {
iResolverIndex.value() < static_cast<ESResolverIndex::Value_t>(keysForProxies_.size()));
void const* pValue = this->getFromResolverAfterPrefetch(iResolverIndex, iTransientAccessOnly, oDesc, dataKey);
if (nullptr == pValue) {
whyFailedFactory = makeESHandleExceptionFactory([=, *this] {
NoProductResolverException<DataT> ex(this->key(), *dataKey);
whyFailedFactory = makeESHandleExceptionFactory([=, key=this->key()] {
NoProductResolverException<DataT> ex(key, *dataKey);
return std::make_exception_ptr(ex);
});
}
Expand Down

0 comments on commit aebc73f

Please sign in to comment.