Skip to content

Commit db03b4c

Browse files
authored
Fix get_first_trip_stop (#307)
1 parent 18ef898 commit db03b4c

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/rt/frun.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,10 @@ run_stop run_stop::get_first_trip_stop(event_type const ev_type) const {
131131
auto const trip = get_trip_idx(ev_type);
132132
auto copy = *this;
133133

134-
while (copy.stop_idx_ > 0U && copy.get_trip_idx(event_type::kDep) == trip) {
134+
while (copy.stop_idx_ > 0U && copy.get_trip_idx(event_type::kArr) == trip) {
135135
--copy.stop_idx_;
136136
}
137137

138-
if (copy.get_trip_idx(event_type::kDep) != trip) {
139-
++copy.stop_idx_;
140-
}
141-
142138
return copy;
143139
}
144140

0 commit comments

Comments
 (0)