Skip to content

Commit

Permalink
parse trip numbers for DB Fernverkehr
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Sep 27, 2024
1 parent b0c27b4 commit d7030f0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/loader/gtfs/trip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,13 @@ std::string trip::display_name(timetable const& tt) const {
route_->agency_ != provider_idx_t::invalid() &&
tt.providers_[route_->agency_].long_name_ == "DB Fernverkehr AG") {
if (route_->clasz_ == clasz::kHighSpeed) {
return trip_name_is_number ? fmt::format("ICE {}", short_name_)
: fmt::format("ICE {}", route_->short_name_);
return trip_name_is_number
? fmt::format("ICE {}", utl::parse<int>(short_name_))
: fmt::format("ICE {}", route_->short_name_);
} else if (route_->clasz_ == clasz::kLongDistance) {
return trip_name_is_number ? fmt::format("IC {}", short_name_)
: fmt::format("IC {}", route_->short_name_);
return trip_name_is_number
? fmt::format("IC {}", utl::parse<int>(short_name_))
: fmt::format("IC {}", route_->short_name_);
}
}

Expand Down

0 comments on commit d7030f0

Please sign in to comment.