Use ID as sort tie-breaker in TimetableProgress comparison

This commit is contained in:
Jonathan G Rennison
2021-08-04 17:33:12 +01:00
parent 4d99c501b3
commit d2dc9fe3d4

View File

@@ -26,7 +26,7 @@ struct TimetableProgress {
int cumulative_ticks; int cumulative_ticks;
bool IsValidForSeparation() const { return this->cumulative_ticks >= 0; } 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<TimetableProgress> PopulateSeparationState(const Vehicle *v_start); std::vector<TimetableProgress> PopulateSeparationState(const Vehicle *v_start);