Skip to content

Commit

Permalink
require trip_short_name.length != 0 for usage as train number
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Nov 16, 2023
1 parent 6ab4efd commit 70350cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/loader/gtfs/trip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ std::string trip::display_name(timetable const& tt) const {
: "Tram " + route_->short_name_;
}

auto const trip_name_is_number = utl::all_of(short_name_, is_digit);
auto const trip_name_is_number =
!short_name_.empty() && utl::all_of(short_name_, is_digit);
if (route_->agency_ != provider_idx_t::invalid() &&
tt.providers_[route_->agency_].long_name_ == "DB Fernverkehr AG") {
if (route_->clasz_ == clasz::kHighSpeed) {
Expand Down

0 comments on commit 70350cc

Please sign in to comment.