Skip to content

Commit

Permalink
Fix a few more shadowing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 8, 2024
1 parent 69617b2 commit 5408582
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions k4EDM4hep2LcioConv/src/k4Lcio2EDM4hepConv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ podio::Frame convertEvent(EVENT::LCEvent* evt, const std::vector<std::pair<std::
const auto collNames = [&collsToConvert, &evt]() {
if (collsToConvert.empty()) {
const auto evtColls = evt->getCollectionNames();
std::vector<std::pair<std::string, std::string>> collNames{};
collNames.reserve(evtColls->size());
std::vector<std::pair<std::string, std::string>> resCollNames{};
resCollNames.reserve(evtColls->size());
for (const auto& name : *evtColls) {
collNames.emplace_back(name, name);
resCollNames.emplace_back(name, name);
}
return collNames;
return resCollNames;
}
return std::move(collsToConvert);
return collsToConvert;
}();

// In this loop the data gets converted.
Expand Down
4 changes: 2 additions & 2 deletions tests/src/ComparisonUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ bool compareValuesNanSafe(LCIO lcioV, EDM4hepT edm4hepV, const std::string& msg)
>;

if constexpr (isVectorLike) {
const auto vecSize = [](EDM4hepT& edm4hepV) -> std::size_t {
const auto vecSize = [](EDM4hepT& edm4hepVal) -> std::size_t {
if constexpr (has_size_method<EDM4hepT>::value) {
return edm4hepV.size();
return edm4hepVal.size();
} else if constexpr (std::is_same_v<EDM4hepT, edm4hep::Vector3f> || std::is_same_v<EDM4hepT, edm4hep::Vector3d>) {
return 3u;
} else if constexpr (std::is_same_v<EDM4hepT, edm4hep::Vector2i> || std::is_same_v<EDM4hepT, edm4hep::Vector2f>) {
Expand Down

0 comments on commit 5408582

Please sign in to comment.