1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 17:32:54 +08:00

Rename ordering helper method

This commit is contained in:
Dean Herbert 2022-09-08 17:50:27 +09:00
parent 267465df18
commit c6521e4c72
2 changed files with 3 additions and 6 deletions

View File

@ -286,14 +286,11 @@ namespace osu.Game.Rulesets.Scoring
}
/// <summary>
/// Ordered index of a <see cref="HitResult"/>. Used for sorting.
/// Ordered index of a <see cref="HitResult"/>. Used for consistent order when displaying hit results to the user.
/// </summary>
/// <param name="result">The <see cref="HitResult"/> to get the index of.</param>
/// <returns>The index of <paramref name="result"/>.</returns>
public static int OrderingIndex(this HitResult result)
{
return order.IndexOf(result);
}
public static int GetIndexForOrderedDisplay(this HitResult result) => order.IndexOf(result);
}
#pragma warning restore CS0618
}

View File

@ -225,7 +225,7 @@ namespace osu.Game.Screens.Ranking.Statistics
public Bar(IDictionary<HitResult, int> values, float maxValue, bool isCentre)
{
this.values = values.OrderBy(v => v.Key.OrderingIndex()).ToList();
this.values = values.OrderBy(v => v.Key.GetIndexForOrderedDisplay()).ToList();
this.maxValue = maxValue;
this.isCentre = isCentre;