From e018a6d6a5a968e3d9a148996b6c2f59377f9433 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 15 Oct 2021 14:08:25 +0900 Subject: [PATCH] Attempt bumping `inspectcode` to fix remaining inspection --- .config/dotnet-tools.json | 2 +- osu.Game/Stores/RealmRulesetStore.cs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 007e4341b8..03b6308f97 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "jetbrains.resharper.globaltools": { - "version": "2020.3.2", + "version": "2021.2.2", "commands": [ "jb" ] diff --git a/osu.Game/Stores/RealmRulesetStore.cs b/osu.Game/Stores/RealmRulesetStore.cs index 51f059caad..1b298f9d49 100644 --- a/osu.Game/Stores/RealmRulesetStore.cs +++ b/osu.Game/Stores/RealmRulesetStore.cs @@ -106,9 +106,8 @@ namespace osu.Game.Stores var rulesets = realm.All(); List instances = loadedAssemblies.Values - .Select(r => Activator.CreateInstance(r) as Ruleset) - .Where(r => r != null) - .Cast() + .Select(Activator.CreateInstance) + .OfType() .ToList(); // add all legacy rulesets first to ensure they have exclusive choice of primary key.