Skip to content

Commit

Permalink
support old way of track changes
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Nov 24, 2023
1 parent e56ce43 commit f6784d2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/rt/gtfsrt_update.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,17 @@ void update_run(
gtfsrt::TripUpdate_StopTimeUpdate_ScheduleRelationship_SKIPPED) {
// Cancel skipped stops (in_allowed = out_allowed = false).
stp = stop{stop{stp}.location_idx(), false, false}.value();
} else if (upd_it->stop_time_properties().has_assigned_stop_id()) {
} else if (upd_it->stop_time_properties().has_assigned_stop_id() ||
(upd_it->has_stop_id() &&
upd_it->stop_id() !=
tt.locations_
.ids_[stop{location_seq[stop_idx]}.location_idx()]
.view())) {
// Handle track change.
auto const& new_id = upd_it->stop_time_properties().assigned_stop_id();
auto const& new_id =
upd_it->stop_time_properties().has_assigned_stop_id()
? upd_it->stop_time_properties().assigned_stop_id()
: upd_it->stop_id();
auto const l_it = tt.locations_.location_id_to_idx_.find(
{.id_ = new_id, .src_ = src});
if (l_it != end(tt.locations_.location_id_to_idx_)) {
Expand Down

0 comments on commit f6784d2

Please sign in to comment.