Skip to content

Commit

Permalink
Simplify logic a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Oct 28, 2024
1 parent 579449d commit 1cbec5c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions k4MarlinWrapper/src/components/EDM4hep2Lcio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,10 @@ podio::CollectionBase* EDM4hep2LcioTool::getEDM4hepCollection(const std::string&
// std::shared_ptr but this has been removed in k4FWCore so it can be deleted
// at some point
auto uptr = dynamic_cast<AnyDataWrapper<std::unique_ptr<podio::CollectionBase>>*>(p);
AnyDataWrapper<std::shared_ptr<podio::CollectionBase>>* sptr = nullptr;
if (!uptr) {
sptr = dynamic_cast<AnyDataWrapper<std::shared_ptr<podio::CollectionBase>>*>(p);
} else {
if (uptr) {
return uptr->getData().get();
}
auto sptr = dynamic_cast<AnyDataWrapper<std::shared_ptr<podio::CollectionBase>>*>(p);
if (sptr) {
return sptr->getData().get();
}
Expand Down

0 comments on commit 1cbec5c

Please sign in to comment.