mirror of
https://github.com/ppy/osu
synced 2024-12-17 20:35:21 +00:00
Use DEFAULT
instead of INSTANCE
or static field
Matches other similar comparers.
This commit is contained in:
parent
929858226a
commit
fb593470d5
@ -31,7 +31,7 @@ namespace osu.Game.Benchmarks
|
|||||||
public void OrdinalIgnoreCase() => compare(StringComparer.OrdinalIgnoreCase);
|
public void OrdinalIgnoreCase() => compare(StringComparer.OrdinalIgnoreCase);
|
||||||
|
|
||||||
[Benchmark]
|
[Benchmark]
|
||||||
public void OrdinalSortByCase() => compare(OrdinalSortByCaseStringComparer.INSTANCE);
|
public void OrdinalSortByCase() => compare(OrdinalSortByCaseStringComparer.DEFAULT);
|
||||||
|
|
||||||
[Benchmark]
|
[Benchmark]
|
||||||
public void InvariantCulture() => compare(StringComparer.InvariantCulture);
|
public void InvariantCulture() => compare(StringComparer.InvariantCulture);
|
||||||
|
@ -68,19 +68,19 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case SortMode.Artist:
|
case SortMode.Artist:
|
||||||
comparison = OrdinalSortByCaseStringComparer.INSTANCE.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist);
|
comparison = OrdinalSortByCaseStringComparer.DEFAULT.Compare(BeatmapSet.Metadata.Artist, otherSet.BeatmapSet.Metadata.Artist);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.Title:
|
case SortMode.Title:
|
||||||
comparison = OrdinalSortByCaseStringComparer.INSTANCE.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title);
|
comparison = OrdinalSortByCaseStringComparer.DEFAULT.Compare(BeatmapSet.Metadata.Title, otherSet.BeatmapSet.Metadata.Title);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.Author:
|
case SortMode.Author:
|
||||||
comparison = OrdinalSortByCaseStringComparer.INSTANCE.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username);
|
comparison = OrdinalSortByCaseStringComparer.DEFAULT.Compare(BeatmapSet.Metadata.Author.Username, otherSet.BeatmapSet.Metadata.Author.Username);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.Source:
|
case SortMode.Source:
|
||||||
comparison = OrdinalSortByCaseStringComparer.INSTANCE.Compare(BeatmapSet.Metadata.Source, otherSet.BeatmapSet.Metadata.Source);
|
comparison = OrdinalSortByCaseStringComparer.DEFAULT.Compare(BeatmapSet.Metadata.Source, otherSet.BeatmapSet.Metadata.Source);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.DateAdded:
|
case SortMode.DateAdded:
|
||||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Utils
|
|||||||
/// </example>
|
/// </example>
|
||||||
public class OrdinalSortByCaseStringComparer : IComparer<string>
|
public class OrdinalSortByCaseStringComparer : IComparer<string>
|
||||||
{
|
{
|
||||||
public static readonly OrdinalSortByCaseStringComparer INSTANCE = new OrdinalSortByCaseStringComparer();
|
public static readonly OrdinalSortByCaseStringComparer DEFAULT = new OrdinalSortByCaseStringComparer();
|
||||||
|
|
||||||
private OrdinalSortByCaseStringComparer()
|
private OrdinalSortByCaseStringComparer()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user