Skip to content

Commit

Permalink
Change min/max calcuations to one-liners
Browse files Browse the repository at this point in the history
  • Loading branch information
Blanco Alonso Jorge committed Oct 9, 2020
1 parent 2b4e03f commit fc0da88
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/report_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,10 @@ DataFrame<T> ReportReader<T>::Population::get(const nonstd::optional<Selection>&
if (it == nodes_pointers_.end()) {
continue;
}
if (it->second.first < min) {
min = it->second.first;
}
if (it->second.second > max) {
max = it->second.second;
}
min = std::min(it->second.first, min);
max = std::max(it->second.second, max);
positions.emplace_back(it->second.first, it->second.second);

std::vector<ElementID> element_ids(it->second.second - it->second.first);
dataset_elem_ids.select({it->second.first}, {it->second.second - it->second.first})
.read(element_ids.data());
Expand Down

0 comments on commit fc0da88

Please sign in to comment.