From 1cd93f79b378898feb13ac0142d4be53ff8c5751 Mon Sep 17 00:00:00 2001 From: Alex Amadori Date: Sat, 18 Feb 2017 07:59:01 +0100 Subject: [PATCH] General sorting improvements --- osu.Game/Screens/Select/CarouselContainer.cs | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/osu.Game/Screens/Select/CarouselContainer.cs b/osu.Game/Screens/Select/CarouselContainer.cs index 9ffc5a183a..a121d4b3eb 100644 --- a/osu.Game/Screens/Select/CarouselContainer.cs +++ b/osu.Game/Screens/Select/CarouselContainer.cs @@ -188,26 +188,18 @@ namespace osu.Game.Screens.Select public void Sort(FilterControl.SortMode mode) { switch (mode) { case FilterControl.SortMode.Artist: - groups.Sort((x, y) => - { - return string.Compare(x.BeatmapSet.Metadata.Artist, y.BeatmapSet.Metadata.Artist); - }); + groups.Sort((x, y) => string.Compare(x.BeatmapSet.Metadata.Artist, y.BeatmapSet.Metadata.Artist)); break; case FilterControl.SortMode.Title: - groups.Sort((x, y) => - { - return string.Compare(x.BeatmapSet.Metadata.Title, y.BeatmapSet.Metadata.Title); - }); + groups.Sort((x, y) => string.Compare(x.BeatmapSet.Metadata.Title, y.BeatmapSet.Metadata.Title)); break; case FilterControl.SortMode.Author: - groups.Sort((x, y) => - { - return string.Compare(x.BeatmapSet.Metadata.Author, y.BeatmapSet.Metadata.Author); - }); + groups.Sort((x, y) => string.Compare(x.BeatmapSet.Metadata.Author, y.BeatmapSet.Metadata.Author)); break; case FilterControl.SortMode.Difficulty: groups.Sort((x, y) => { + // TODO: replace with star rating once implemented if (x.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty > y.BeatmapSet.Beatmaps.First().BaseDifficulty.OverallDifficulty) return 1;