diff options
| -rw-r--r-- | src/travel.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/travel.cc b/src/travel.cc index 6b3feb2..3f95757 100644 --- a/src/travel.cc +++ b/src/travel.cc @@ -448,6 +448,13 @@ private: void finder_done() { finder_.reset(); + std::sort(trips_.begin(), trips_.end(), + [] (TripImpl const& a, TripImpl const& b) { + if (a.year() == b.year()) + return a.title() < b.title(); + return a.year() < b.year(); + }); + for (auto& trip_impl : trips_) cleanup_trip(trip_impl); |
