Skip to content

Commit

Permalink
gtfs frequency expansion: ignore trips without events
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Dec 15, 2024
1 parent 7a0b0cc commit 647b29e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/nigiri/loader/gtfs/local_to_utc.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ void expand_frequencies(trip_data const& trip_data,
bitfield const* traffic_days,
Consumer&& consumer) {
auto const has_frequency = [&](gtfs_trip_idx_t const i) {
return trip_data.get(i).frequency_.has_value();
auto const& t = trip_data.get(i);
return !t.event_times_.empty() && t.frequency_.has_value();
};

if (utl::any_of(trips, has_frequency)) {
Expand Down

0 comments on commit 647b29e

Please sign in to comment.