Ensure that SortRailTypes sort is deterministic

Use rail type ID as tie-breaker
This commit is contained in:
Jonathan G Rennison
2023-02-12 22:16:47 +00:00
parent 64699d94c9
commit 55146f459f

View File

@@ -205,9 +205,9 @@ static bool CompareRailTypes(const RailType &first, const RailType &second)
} }
} }
return sort_value[0] < sort_value[1]; return std::tie(sort_value[0], first) < std::tie(sort_value[1], second);
} else { } else {
return GetRailTypeInfo(first)->sorting_order < GetRailTypeInfo(second)->sorting_order; return std::tie(GetRailTypeInfo(first)->sorting_order, first) < std::tie(GetRailTypeInfo(second)->sorting_order, second);
} }
} }