From 647b29eeac551d4fd5383687b4ec434a00916032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Sun, 15 Dec 2024 19:10:02 +0100 Subject: [PATCH] gtfs frequency expansion: ignore trips without events --- include/nigiri/loader/gtfs/local_to_utc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/nigiri/loader/gtfs/local_to_utc.h b/include/nigiri/loader/gtfs/local_to_utc.h index b92925bd1..2ab42d9fa 100644 --- a/include/nigiri/loader/gtfs/local_to_utc.h +++ b/include/nigiri/loader/gtfs/local_to_utc.h @@ -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)) {