From 4981630131a3343aed2004cb3549c97669a33d4a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 16 Oct 2017 13:11:35 +0900 Subject: [PATCH] Fix formatting regressions --- osu.Game/Database/DatabaseBackedStore.cs | 1 - osu.Game/Input/KeyBindingStore.cs | 2 +- osu.Game/Rulesets/RulesetStore.cs | 11 +++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/osu.Game/Database/DatabaseBackedStore.cs b/osu.Game/Database/DatabaseBackedStore.cs index f4b6a866dc..6b3fe232b2 100644 --- a/osu.Game/Database/DatabaseBackedStore.cs +++ b/osu.Game/Database/DatabaseBackedStore.cs @@ -36,7 +36,6 @@ namespace osu.Game.Database /// protected virtual void StartupTasks() { - } /// diff --git a/osu.Game/Input/KeyBindingStore.cs b/osu.Game/Input/KeyBindingStore.cs index 41bdc40a88..e2b6c1dc87 100644 --- a/osu.Game/Input/KeyBindingStore.cs +++ b/osu.Game/Input/KeyBindingStore.cs @@ -67,7 +67,7 @@ namespace osu.Game.Input public void Update(KeyBinding keyBinding) { var dbKeyBinding = Connection.DatabasedKeyBinding.FirstOrDefault(kb => kb.ToString() == keyBinding.ToString()); - if (dbKeyBinding!=null) + if (dbKeyBinding != null) { dbKeyBinding.KeyCombination = keyBinding.KeyCombination; dbKeyBinding.Action = keyBinding.Action; diff --git a/osu.Game/Rulesets/RulesetStore.cs b/osu.Game/Rulesets/RulesetStore.cs index 5a4b33df0b..068997e732 100644 --- a/osu.Game/Rulesets/RulesetStore.cs +++ b/osu.Game/Rulesets/RulesetStore.cs @@ -20,7 +20,8 @@ namespace osu.Game.Rulesets public IEnumerable AllRulesets => Connection.RulesetInfo.Where(r => r.Available); - public RulesetStore(OsuDbContext connection) : base(connection) + public RulesetStore(OsuDbContext connection) + : base(connection) { } @@ -42,14 +43,14 @@ namespace osu.Game.Rulesets { Connection.Database.ExecuteSqlCommand("DELETE FROM RulesetInfo"); } - + var instances = loaded_assemblies.Values.Select(r => (Ruleset)Activator.CreateInstance(r, new RulesetInfo())); //add all legacy modes in correct order foreach (var r in instances.Where(r => r.LegacyID >= 0).OrderBy(r => r.LegacyID)) { var rulesetInfo = createRulesetInfo(r); - if (Connection.RulesetInfo.SingleOrDefault(rsi=>rsi.ID==rulesetInfo.ID)==null) + if (Connection.RulesetInfo.SingleOrDefault(rsi => rsi.ID == rulesetInfo.ID) == null) { Connection.RulesetInfo.Add(rulesetInfo); } @@ -96,7 +97,9 @@ namespace osu.Game.Rulesets var assembly = Assembly.LoadFrom(file); loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsSubclassOf(typeof(Ruleset))); } - catch (Exception) { } + catch (Exception) + { + } } private RulesetInfo createRulesetInfo(Ruleset ruleset) => new RulesetInfo