Fix CI reported warnings

This commit is contained in:
Dean Herbert
2022-01-12 22:34:07 +09:00
parent 08da948afc
commit 51251e3204
25 changed files with 123 additions and 65 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Diagnostics;
using System.Linq;
using JetBrains.Annotations;
@ -131,9 +132,14 @@ namespace osu.Game.Overlays.Profile.Sections.Ranks
Origin = Anchor.CentreRight,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(2),
Children = Score.Mods.Select(mod => new ModIcon(rulesets.GetRuleset(Score.RulesetID).CreateInstance().CreateModFromAcronym(mod.Acronym))
Children = Score.Mods.Select(mod =>
{
Scale = new Vector2(0.35f)
var ruleset = rulesets.GetRuleset(Score.RulesetID) ?? throw new InvalidOperationException();
return new ModIcon(ruleset.CreateInstance().CreateModFromAcronym(mod.Acronym))
{
Scale = new Vector2(0.35f)
};
}).ToList(),
}
}