Skip to content

Commit

Permalink
address review cmt on cp vector
Browse files Browse the repository at this point in the history
  • Loading branch information
KedoKudo committed Aug 26, 2024
1 parent cf1be8b commit f2c986e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sophiread/SophireadCLI/src/sophiread_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void timedSaveHitsToHDF5(const std::string &out_hits, std::vector<TPX3> &batches
// move all hits into a single vector
std::vector<Hit> hits;
for (const auto &tpx3 : batches) {
auto tpx3_hits = tpx3.hits;
hits.insert(hits.end(), tpx3_hits.begin(), tpx3_hits.end());
const auto &tpx3_hits = tpx3.hits;
hits.insert(hits.end(), tpx3_hits.cbegin(), tpx3_hits.cend());
}
// save hits to HDF5 file
saveHitsToHDF5(out_hits, hits);
Expand All @@ -145,8 +145,8 @@ void timedSaveEventsToHDF5(const std::string &out_events, std::vector<TPX3> &bat
// move all events into a single vector
std::vector<Neutron> events;
for (const auto &tpx3 : batches) {
auto tpx3_events = tpx3.neutrons;
events.insert(events.end(), tpx3_events.begin(), tpx3_events.end());
const auto &tpx3_events = tpx3.neutrons;
events.insert(events.end(), tpx3_events.cbegin(), tpx3_events.cend());
}
// save events to HDF5 file
saveNeutronToHDF5(out_events, events);
Expand Down

0 comments on commit f2c986e

Please sign in to comment.