From d2dc9fe3d41f0b5d306f4c9c5b92a91c56235bef Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 4 Aug 2021 17:33:12 +0100 Subject: [PATCH] Use ID as sort tie-breaker in TimetableProgress comparison --- src/timetable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timetable.h b/src/timetable.h index 61b05596ff..bc8ee90ee2 100644 --- a/src/timetable.h +++ b/src/timetable.h @@ -26,7 +26,7 @@ struct TimetableProgress { int cumulative_ticks; bool IsValidForSeparation() const { return this->cumulative_ticks >= 0; } - bool operator<(const TimetableProgress& other) const { return std::tie(this->order_count, this->order_ticks) < std::tie(other.order_count, other.order_ticks); } + bool operator<(const TimetableProgress& other) const { return std::tie(this->order_count, this->order_ticks, this->id) < std::tie(other.order_count, other.order_ticks, other.id); } }; std::vector PopulateSeparationState(const Vehicle *v_start);