From 4c516ac315b9b621652db93baee2e54d22f103cf Mon Sep 17 00:00:00 2001 From: andy840119 Date: Thu, 13 Jul 2023 23:56:41 +0800 Subject: [PATCH] Can use string.Empty() instead. --- .../ChangeHandlers/Lyrics/LyricTranslateChangeHandlerTest.cs | 2 +- .../Edit/Beatmaps/Components/UserInterfaceV2/LyricSelector.cs | 2 +- osu.Game.Rulesets.Karaoke/Screens/Edit/IssueSection.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTranslateChangeHandlerTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTranslateChangeHandlerTest.cs index 7cdb7e9d2..7e684cb2a 100644 --- a/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTranslateChangeHandlerTest.cs +++ b/osu.Game.Rulesets.Karaoke.Tests/Editor/ChangeHandlers/Lyrics/LyricTranslateChangeHandlerTest.cs @@ -81,7 +81,7 @@ public void TestUpdateTranslateWithNullText() } }); - TriggerHandlerChanged(c => c.UpdateTranslate(new CultureInfo(17), "")); + TriggerHandlerChanged(c => c.UpdateTranslate(new CultureInfo(17), string.Empty)); AssertSelectedHitObject(h => { diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/UserInterfaceV2/LyricSelector.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/UserInterfaceV2/LyricSelector.cs index 5473ea802..541ccab8d 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/UserInterfaceV2/LyricSelector.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Components/UserInterfaceV2/LyricSelector.cs @@ -117,7 +117,7 @@ public DrawableLyricListItem(Lyric? item) public override IEnumerable FilterTerms => new[] { - new LocalisableString(Model?.Text ?? ""), + new LocalisableString(Model?.Text ?? string.Empty), }; protected override void CreateDisplayContent(OsuTextFlowContainer textFlowContainer, Lyric? model) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/IssueSection.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/IssueSection.cs index 713b58147..404eea6a4 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/IssueSection.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/IssueSection.cs @@ -234,7 +234,7 @@ private LocalisableString getTextByIssueType(IssueType issueType) => }; private Colour4 getColourByIssueType(IssueType issueType) => - new IssueTemplate(new EmptyCheck(), issueType, "").Colour; + new IssueTemplate(new EmptyCheck(), issueType, string.Empty).Colour; [BackgroundDependencyLoader] private void load(OverlayColourProvider colourProvider)