From 251bdfdee8c0232235b8de4f25620ca270946fd6 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 7 May 2018 11:33:15 +0900 Subject: [PATCH] Simplify statistics in osu ruleset --- osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmap.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmap.cs b/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmap.cs index 7b534deccf..6d90c2a875 100644 --- a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmap.cs +++ b/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmap.cs @@ -5,7 +5,6 @@ using System.Collections.Generic; using System.Linq; using osu.Game.Beatmaps; using osu.Game.Graphics; -using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.Osu.Objects; namespace osu.Game.Rulesets.Osu.Beatmaps @@ -14,28 +13,28 @@ namespace osu.Game.Rulesets.Osu.Beatmaps { public override IEnumerable GetStatistics() { - IEnumerable circles = HitObjects.Where(c => c is HitCircle); - IEnumerable sliders = HitObjects.Where(s => s is Slider); - IEnumerable spinners = HitObjects.Where(s => s is Spinner); + int circles = HitObjects.Count(c => c is HitCircle); + int sliders = HitObjects.Count(s => s is Slider); + int spinners = HitObjects.Count(s => s is Spinner); return new[] { new BeatmapStatistic { Name = @"Circle Count", - Content = circles.Count().ToString(), + Content = circles.ToString(), Icon = FontAwesome.fa_circle_o }, new BeatmapStatistic { Name = @"Slider Count", - Content = sliders.Count().ToString(), + Content = sliders.ToString(), Icon = FontAwesome.fa_circle }, new BeatmapStatistic { Name = @"Spinner Count", - Content = spinners.Count().ToString(), + Content = spinners.ToString(), Icon = FontAwesome.fa_circle } };