From 52ccfe6a3662d7e1e54c551148b94ae40bae68a9 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 7 Dec 2024 16:39:37 +0800 Subject: [PATCH 1/5] Remove/re-sort unused namespace. --- .../Editor/ChangeHandlers/BaseChangeHandlerTest.cs | 1 - .../Serialization/Converters/KaraokeSkinElementConverterTest.cs | 1 - osu.Game.Rulesets.Karaoke/Beatmaps/KaraokeBeatmap.cs | 2 -- .../Edit/ChangeHandlers/Stages/StagesChangeHandler.cs | 2 -- osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs | 1 - .../Graphics/UserInterfaceV2/LabelledRealTimeSliderBar.cs | 2 +- .../Screens/Edit/Stages/Classic/Stage/StageScreen.cs | 2 -- osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs | 1 - 8 files changed, 1 insertion(+), 11 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/BaseChangeHandlerTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/BaseChangeHandlerTest.cs index 3895d9eab..6f2e74812 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/BaseChangeHandlerTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/BaseChangeHandlerTest.cs @@ -12,7 +12,6 @@ using osu.Game.Rulesets.Karaoke.Configuration; using osu.Game.Rulesets.Karaoke.Edit.Utils; using osu.Game.Rulesets.Karaoke.Objects; -using osu.Game.Rulesets.Karaoke.Stages.Infos.Types; using osu.Game.Rulesets.Objects; using osu.Game.Screens.Edit; using osu.Game.Tests.Visual; diff --git a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs index 3a82134ba..dc93a93c3 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/IO/Serialization/Converters/KaraokeSkinElementConverterTest.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using Newtonsoft.Json; using NUnit.Framework; -using osu.Framework.Graphics; using osu.Framework.IO.Serialization; using osu.Game.Rulesets.Karaoke.IO.Serialization.Converters; using osu.Game.Rulesets.Karaoke.Skinning.Elements; diff --git a/osu.Game.Rulesets.Karaoke/Beatmaps/KaraokeBeatmap.cs b/osu.Game.Rulesets.Karaoke/Beatmaps/KaraokeBeatmap.cs index 108f7b336..9ddbc249a 100644 --- a/osu.Game.Rulesets.Karaoke/Beatmaps/KaraokeBeatmap.cs +++ b/osu.Game.Rulesets.Karaoke/Beatmaps/KaraokeBeatmap.cs @@ -4,12 +4,10 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Newtonsoft.Json; using osu.Framework.Graphics.Sprites; using osu.Game.Beatmaps; using osu.Game.Rulesets.Karaoke.Beatmaps.Metadatas; using osu.Game.Rulesets.Karaoke.Objects; -using osu.Game.Rulesets.Karaoke.Stages.Infos; namespace osu.Game.Rulesets.Karaoke.Beatmaps; diff --git a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Stages/StagesChangeHandler.cs b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Stages/StagesChangeHandler.cs index 23006e0f4..4ea864180 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Stages/StagesChangeHandler.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/ChangeHandlers/Stages/StagesChangeHandler.cs @@ -3,9 +3,7 @@ using System; using System.Collections.Generic; -using System.Linq; using osu.Framework.Allocation; -using osu.Framework.Graphics; using osu.Framework.Localisation; using osu.Game.Rulesets.Karaoke.Beatmaps; using osu.Game.Rulesets.Karaoke.Configuration; diff --git a/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs b/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs index 20007359e..a829f4f7a 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/DrawableKaraokeEditorRuleset.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using osu.Game.Beatmaps; -using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Karaoke.UI; using osu.Game.Rulesets.Karaoke.Utils; using osu.Game.Rulesets.Mods; diff --git a/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/LabelledRealTimeSliderBar.cs b/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/LabelledRealTimeSliderBar.cs index ec816d46e..0e5c6f7b0 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/LabelledRealTimeSliderBar.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/UserInterfaceV2/LabelledRealTimeSliderBar.cs @@ -1,10 +1,10 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. +using System.Numerics; using osu.Framework.Graphics; using osu.Game.Graphics.UserInterfaceV2; using osu.Game.Overlays.Settings; -using System.Numerics; namespace osu.Game.Rulesets.Karaoke.Graphics.UserInterfaceV2; diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Stages/Classic/Stage/StageScreen.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Stages/Classic/Stage/StageScreen.cs index 505a2b5ae..b37dd4d71 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Stages/Classic/Stage/StageScreen.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Stages/Classic/Stage/StageScreen.cs @@ -7,10 +7,8 @@ using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Stages; -using osu.Game.Rulesets.Karaoke.Edit.Utils; using osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic.Stage.Settings; using osu.Game.Rulesets.Karaoke.Stages.Infos.Classic; -using osu.Game.Screens.Edit; namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Stages.Classic.Stage; diff --git a/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs b/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs index 8740328d8..94058d9c1 100644 --- a/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs +++ b/osu.Game.Rulesets.Karaoke/UI/DrawableKaraokeRuleset.cs @@ -1,7 +1,6 @@ // Copyright (c) andy840119 . Licensed under the GPL Licence. // See the LICENCE file in the repository root for full licence text. -using System; using System.Collections.Generic; using osu.Framework.Allocation; using osu.Framework.Bindables; From 88d118f8c7ed86f64b2e349f3112b1409d331dbd Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 7 Dec 2024 16:41:13 +0800 Subject: [PATCH 2/5] Remove/add missing space. --- .../ChangeHandlers/Stages/BaseStageInfoChangeHandlerTest.cs | 2 +- .../Stages/StageElementCategoryChangeHandlerTest.cs | 2 +- .../Editor/Checks/CheckStageInfoTest.cs | 2 +- .../Mods/TestSceneKaraokeModPerfect.cs | 2 +- .../Edit/Setup/Components/FormSingerList.cs | 2 +- .../Stages/Commands/StageHeightCommand.cs | 2 +- osu.Game.Rulesets.Karaoke/Stages/Drawables/DrawableStage.cs | 2 +- .../Stages/Infos/Preview/PreviewLyricCommandProvider.cs | 6 +++--- osu.Game.Rulesets.Karaoke/Utils/StackTraceUtils.cs | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/BaseStageInfoChangeHandlerTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/BaseStageInfoChangeHandlerTest.cs index e3aa95f1d..efdfdfa52 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/BaseStageInfoChangeHandlerTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/BaseStageInfoChangeHandlerTest.cs @@ -17,6 +17,6 @@ protected virtual void SetUpStageInfo(Action? action = n public void AssertStageInfos(Action> assert) => throw new NotImplementedException(); - public void AssertStageInfo(Action assert) where TStageInfo: StageInfo + public void AssertStageInfo(Action assert) where TStageInfo : StageInfo => throw new NotImplementedException(); } diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/StageElementCategoryChangeHandlerTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/StageElementCategoryChangeHandlerTest.cs index 34dc12deb..9089a0b91 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/StageElementCategoryChangeHandlerTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Stages/StageElementCategoryChangeHandlerTest.cs @@ -292,7 +292,7 @@ protected override double GeneratePreemptTime(Lyric hitObject) protected override Tuple GetStartAndEndTime(Lyric lyric) { - if(!lyric.TimeValid) + if (!lyric.TimeValid) return new Tuple(null, null); return new Tuple(lyric.StartTime, lyric.EndTime); diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/Checks/CheckStageInfoTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/Checks/CheckStageInfoTest.cs index c34b4ae3f..65406a798 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/Checks/CheckStageInfoTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/Checks/CheckStageInfoTest.cs @@ -104,7 +104,7 @@ private static IBeatmap createTestingBeatmap(IEnumerable? lyrics) return new EditorBeatmap(karaokeBeatmap); } - private static StageInfo createTestingStageInfo( Action? editStageAction = null) + private static StageInfo createTestingStageInfo(Action? editStageAction = null) { var stageInfo = new ClassicStageInfo(); editStageAction?.Invoke(stageInfo.LyricLayoutCategory); diff --git a/osu.Game.Rulesets.Karaoke.Tests/Mods/TestSceneKaraokeModPerfect.cs b/osu.Game.Rulesets.Karaoke.Tests/Mods/TestSceneKaraokeModPerfect.cs index c938cf1dc..86e54596d 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Mods/TestSceneKaraokeModPerfect.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Mods/TestSceneKaraokeModPerfect.cs @@ -23,7 +23,7 @@ public TestSceneKaraokeModPerfect() public void TestLyric(bool shouldMiss) => CreateHitObjectTest(new HitObjectTestData(new Lyric { Text = "カラオケ!", - TimeTags = new [] + TimeTags = new[] { new TimeTag(new TextIndex(), 1000), new TimeTag(new TextIndex(3, TextIndex.IndexState.End), 2000), diff --git a/osu.Game.Rulesets.Karaoke/Edit/Setup/Components/FormSingerList.cs b/osu.Game.Rulesets.Karaoke/Edit/Setup/Components/FormSingerList.cs index 8e2e040e7..4c9ae54ed 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Setup/Components/FormSingerList.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Setup/Components/FormSingerList.cs @@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Karaoke.Edit.Setup.Components; public partial class FormSingerList : CompositeDrawable { - public BindableList Singers { get; } = new(); + public BindableList Singers { get; } = new(); public LocalisableString Caption { get; init; } diff --git a/osu.Game.Rulesets.Karaoke/Stages/Commands/StageHeightCommand.cs b/osu.Game.Rulesets.Karaoke/Stages/Commands/StageHeightCommand.cs index cf7671bf7..30db3eb63 100644 --- a/osu.Game.Rulesets.Karaoke/Stages/Commands/StageHeightCommand.cs +++ b/osu.Game.Rulesets.Karaoke/Stages/Commands/StageHeightCommand.cs @@ -6,7 +6,7 @@ namespace osu.Game.Rulesets.Karaoke.Stages.Commands; -public class StageHeightCommand: StageCommand +public class StageHeightCommand : StageCommand { public StageHeightCommand(Easing easing, double startTime, double endTime, float startValue, float endValue) : base(easing, startTime, endTime, startValue, endValue) diff --git a/osu.Game.Rulesets.Karaoke/Stages/Drawables/DrawableStage.cs b/osu.Game.Rulesets.Karaoke/Stages/Drawables/DrawableStage.cs index f61591c75..479694cbe 100644 --- a/osu.Game.Rulesets.Karaoke/Stages/Drawables/DrawableStage.cs +++ b/osu.Game.Rulesets.Karaoke/Stages/Drawables/DrawableStage.cs @@ -69,7 +69,7 @@ public override void Add(Drawable drawable) { base.Add(drawable); - if(drawable is KaraokePlayfield karaokePlayfield) + if (drawable is KaraokePlayfield karaokePlayfield) stagePlayfieldRunner.UpdatePlayfieldTransforms(karaokePlayfield); } diff --git a/osu.Game.Rulesets.Karaoke/Stages/Infos/Preview/PreviewLyricCommandProvider.cs b/osu.Game.Rulesets.Karaoke/Stages/Infos/Preview/PreviewLyricCommandProvider.cs index 3900da557..d4e2a9446 100644 --- a/osu.Game.Rulesets.Karaoke/Stages/Infos/Preview/PreviewLyricCommandProvider.cs +++ b/osu.Game.Rulesets.Karaoke/Stages/Infos/Preview/PreviewLyricCommandProvider.cs @@ -72,10 +72,10 @@ static float getTargetPosition(PreviewStageDefinition definition, PreviewLyricLa static float getPreemptAlpha(PreviewStageDefinition definition, PreviewLyricLayout layout) { - if(isFirstLyricInView(layout)) + if (isFirstLyricInView(layout)) return 1; - if(isLastLyricInView(layout)) + if (isLastLyricInView(layout)) return 0; return definition.InactiveAlpha; @@ -83,7 +83,7 @@ static float getPreemptAlpha(PreviewStageDefinition definition, PreviewLyricLayo static float getTargetAlpha(PreviewStageDefinition definition, PreviewLyricLayout layout) { - if(isFirstLyricInView(layout)) + if (isFirstLyricInView(layout)) return 1; return definition.InactiveAlpha; diff --git a/osu.Game.Rulesets.Karaoke/Utils/StackTraceUtils.cs b/osu.Game.Rulesets.Karaoke/Utils/StackTraceUtils.cs index 06ed88b2e..046c14a84 100644 --- a/osu.Game.Rulesets.Karaoke/Utils/StackTraceUtils.cs +++ b/osu.Game.Rulesets.Karaoke/Utils/StackTraceUtils.cs @@ -9,7 +9,7 @@ public class StackTraceUtils { public static bool IsStackTraceContains(string text) { - string? stackTrace = Environment.StackTrace; + string? stackTrace = Environment.StackTrace; return stackTrace.Contains(text); } } From b34e3dac961287f6286fcea83d733b5872bd584c Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 7 Dec 2024 16:44:31 +0800 Subject: [PATCH 3/5] Some property assign can be moved into ctor. --- .../Sprites/DrawableKaraokeSpriteText.cs | 40 ++++++++++--------- .../Sprites/DrawableLyricSpriteText.cs | 24 ++++++----- .../Components/Menus/ImportLyricMenu.cs | 6 ++- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableKaraokeSpriteText.cs b/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableKaraokeSpriteText.cs index 90ff89df5..86a323f3f 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableKaraokeSpriteText.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableKaraokeSpriteText.cs @@ -20,26 +20,28 @@ public DrawableKaraokeSpriteText(Lyric lyric) protected DrawableKaraokeSpriteText(Lyric lyric) { - processor = new DisplayLyricProcessor(lyric); - processor.TopTextChanged = topTexts => + processor = new DisplayLyricProcessor(lyric) { - TopTexts = topTexts; - OnPropertyChanged(); - }; - processor.CenterTextChanged = text => - { - Text = text; - OnPropertyChanged(); - }; - processor.BottomTextChanged = bottomTexts => - { - BottomTexts = bottomTexts; - OnPropertyChanged(); - }; - processor.TimeTagsChanged = timeTags => - { - TimeTags = timeTags; - OnPropertyChanged(); + TopTextChanged = topTexts => + { + TopTexts = topTexts; + OnPropertyChanged(); + }, + CenterTextChanged = text => + { + Text = text; + OnPropertyChanged(); + }, + BottomTextChanged = bottomTexts => + { + BottomTexts = bottomTexts; + OnPropertyChanged(); + }, + TimeTagsChanged = timeTags => + { + TimeTags = timeTags; + OnPropertyChanged(); + }, }; processor.UpdateAll(); } diff --git a/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableLyricSpriteText.cs b/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableLyricSpriteText.cs index 55053bd14..10eed3d38 100644 --- a/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableLyricSpriteText.cs +++ b/osu.Game.Rulesets.Karaoke/Graphics/Sprites/DrawableLyricSpriteText.cs @@ -12,18 +12,20 @@ public partial class DrawableLyricSpriteText : LyricSpriteText public DrawableLyricSpriteText(Lyric lyric) { - processor = new DisplayLyricProcessor(lyric); - processor.TopTextChanged = topTexts => + processor = new DisplayLyricProcessor(lyric) { - TopTexts = topTexts; - }; - processor.CenterTextChanged = text => - { - Text = text; - }; - processor.BottomTextChanged = bottomTexts => - { - BottomTexts = bottomTexts; + TopTextChanged = topTexts => + { + TopTexts = topTexts; + }, + CenterTextChanged = text => + { + Text = text; + }, + BottomTextChanged = bottomTexts => + { + BottomTexts = bottomTexts; + }, }; processor.UpdateAll(); } diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/ImportLyricMenu.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/ImportLyricMenu.cs index d44d367f6..b32bfb8ca 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/ImportLyricMenu.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/Menus/ImportLyricMenu.cs @@ -20,8 +20,10 @@ private static void openLyricImporter(IScreen? screen, IImportBeatmapChangeHandl if (screen == null) return; - var importer = new LyricImporter(); - importer.OnImportFinished = importBeatmapChangeHandler.Import; + var importer = new LyricImporter + { + OnImportFinished = importBeatmapChangeHandler.Import, + }; screen.Push(importer); } } From 82d6e8df7685765b93cb51fd9a9b8cd846cb271d Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 7 Dec 2024 16:45:18 +0800 Subject: [PATCH 4/5] Reduce the namespace import. --- osu.Game.Rulesets.Karaoke/Screens/Edit/BottomBar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/BottomBar.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/BottomBar.cs index 36f0dc091..028ffe2ea 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/BottomBar.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/BottomBar.cs @@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit; /// -/// Copy the Component from the +/// Copy the Component from the /// public partial class BottomBar : CompositeDrawable { From b20876098885ca46bcc2ca66fc063f50447290be Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 7 Dec 2024 16:48:14 +0800 Subject: [PATCH 5/5] Remove unnecessary generic type. --- osu.Game.Rulesets.Karaoke.Architectures/Extensions.cs | 2 +- .../Helper/TestCaseTagHelper.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Architectures/Extensions.cs b/osu.Game.Rulesets.Karaoke.Architectures/Extensions.cs index 3fb33f4c2..ab09dd8bd 100644 --- a/osu.Game.Rulesets.Karaoke.Architectures/Extensions.cs +++ b/osu.Game.Rulesets.Karaoke.Architectures/Extensions.cs @@ -116,7 +116,7 @@ private static string getRelativeNamespace(Project.ProjectAttribute project, str public static IEnumerable GetMethodMembersContainsName(this IType type, string name) { - return type.GetMethodMembers().WhereNameContains(name); + return type.GetMethodMembers().WhereNameContains(name); } public static IEnumerable WhereNameContains(this IEnumerable source, string name) where TType : IHasName diff --git a/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs b/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs index 7e69a4538..99d9b4418 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Helper/TestCaseTagHelper.cs @@ -64,7 +64,7 @@ public static RubyTag ParseRubyTag(string? str) getStringPropertyRegex(':', "ruby"), }); - return getMatchByStatement(str, regex, result => + return getMatchByStatement(str, regex, result => { if (result == null) return new RubyTag(); @@ -103,7 +103,7 @@ public static TimeTag ParseTimeTag(string? str) getStringPropertyRegex('#', "text"), }); - return getMatchByStatement(str, regex, result => + return getMatchByStatement(str, regex, result => { if (result == null) return new TimeTag(new TextIndex()); @@ -165,7 +165,7 @@ public static Lyric ParseLyric(string str, int? id = null) getStringPropertyRegex(':', "lyric"), }); - return getMatchByStatement(str, regex, result => + return getMatchByStatement(str, regex, result => { if (result == null) return new Lyric(); @@ -218,7 +218,7 @@ public static Singer ParseSinger(string? str) { string regex = generateRegex(id_str, Array.Empty()); - return getMatchByStatement(str, regex, result => + return getMatchByStatement(str, regex, result => { if (result == null) return new Singer().ChangeId(ElementId.Empty);