From dd690891175a8597e72005782965c762052a5672 Mon Sep 17 00:00:00 2001 From: cdwcgt Date: Sun, 9 Apr 2023 15:43:18 +0900 Subject: [PATCH] code quality --- .../{LegacyExporterTest.cs => LegacyModelExporterTest.cs} | 1 - osu.Game/Database/LegacyModelExporter.cs | 2 +- osu.Game/Database/LegacyScoreExporter.cs | 3 ++- osu.Game/Database/LegacySkinExporter.cs | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) rename osu.Game.Tests/Database/{LegacyExporterTest.cs => LegacyModelExporterTest.cs} (99%) diff --git a/osu.Game.Tests/Database/LegacyExporterTest.cs b/osu.Game.Tests/Database/LegacyModelExporterTest.cs similarity index 99% rename from osu.Game.Tests/Database/LegacyExporterTest.cs rename to osu.Game.Tests/Database/LegacyModelExporterTest.cs index c25e14d2ef..27059c3058 100644 --- a/osu.Game.Tests/Database/LegacyExporterTest.cs +++ b/osu.Game.Tests/Database/LegacyModelExporterTest.cs @@ -92,7 +92,6 @@ public void ExportFileWithSuperLongNameMultipleTimesTest() private void exportItemAndAssert(TestRealmObject item, string expectedName) { - // ReSharper disable once AsyncVoidLambda Assert.DoesNotThrow(() => { Task t = Task.Run(() => legacyExporter.ExportAsync(new TestRealmLive(item))); diff --git a/osu.Game/Database/LegacyModelExporter.cs b/osu.Game/Database/LegacyModelExporter.cs index 7904be7f4f..0e4fefae5c 100644 --- a/osu.Game/Database/LegacyModelExporter.cs +++ b/osu.Game/Database/LegacyModelExporter.cs @@ -107,7 +107,7 @@ public async Task ExportAsync(Live model, CancellationToken cancel .GetFiles(string.Empty, $"{itemFilename}*{FileExtension}") .Concat(exportStorage.GetDirectories(string.Empty)); string filename = NamingUtils.GetNextBestFilename(existingExports, $"{itemFilename}{FileExtension}"); - bool success = false; + bool success; ProgressNotification notification = new ProgressNotification { diff --git a/osu.Game/Database/LegacyScoreExporter.cs b/osu.Game/Database/LegacyScoreExporter.cs index bd7d273a64..e7473c963b 100644 --- a/osu.Game/Database/LegacyScoreExporter.cs +++ b/osu.Game/Database/LegacyScoreExporter.cs @@ -13,7 +13,8 @@ namespace osu.Game.Database { public class LegacyScoreExporter : LegacyModelExporter { - public LegacyScoreExporter(Storage storage) : base(storage) + public LegacyScoreExporter(Storage storage) + : base(storage) { } diff --git a/osu.Game/Database/LegacySkinExporter.cs b/osu.Game/Database/LegacySkinExporter.cs index 2a531203bc..4775a54c13 100644 --- a/osu.Game/Database/LegacySkinExporter.cs +++ b/osu.Game/Database/LegacySkinExporter.cs @@ -8,7 +8,8 @@ namespace osu.Game.Database { public class LegacySkinExporter : LegacyArchiveExporter { - public LegacySkinExporter(Storage storage) : base(storage) + public LegacySkinExporter(Storage storage) + : base(storage) { }