Skip to content

Commit

Permalink
#410: util: dereference iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 25, 2019
1 parent 4d5b892 commit aeed355
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/vt/termination/interval/discrete_interval.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ struct IntervalSetBase {
vtAssertExpr(it not_eq set_.end());
if (it not_eq set_.begin()) {
auto prev = std::prev(it);
if (it->tangent(prev) == PositionType::TangentLeft) {
it->join(prev, PositionType::TangentLeft);
if (it->tangent(*prev) == PositionType::TangentLeft) {
it->join(*prev, PositionType::TangentLeft);
set_.erase(prev);
}
}
Expand All @@ -357,8 +357,8 @@ struct IntervalSetBase {
vtAssertExpr(it not_eq set_.end());
auto next = std::next(it);
if (it not_eq set_.end()) {
if (it->tangent(next) == PositionType::TangentRight) {
it->join(next, PositionType::TangentRight);
if (it->tangent(*next) == PositionType::TangentRight) {
it->join(*next, PositionType::TangentRight);
set_.erase(next);
}
}
Expand Down

0 comments on commit aeed355

Please sign in to comment.