diff --git a/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs
index 4ea381843..c4965aa4b 100644
--- a/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs
+++ b/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs
@@ -54,7 +54,7 @@ public void TestSort(string[] timeTagTexts, string[] expectedTimeTags)
var timeTags = TestCaseTagHelper.ParseTimeTags(timeTagTexts);
var expected = TestCaseTagHelper.ParseTimeTags(expectedTimeTags);
- var actual = TimeTagsUtils.Sort(timeTags);
+ var actual = TimeTagsUtils.Sort(timeTags).ToArray();
TimeTagAssert.ArePropertyEqual(expected, actual);
}
diff --git a/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs b/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs
index 310622d04..a7808c43f 100644
--- a/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs
+++ b/osu.Game.Rulesets.Karaoke/Utils/TimeTagsUtils.cs
@@ -60,10 +60,10 @@ public static TimeTag GenerateCenterTimeTag(TimeTag startTimeTag, TimeTag endTim
///
/// Time tags
/// Sorted time tags
- public static IList Sort(IEnumerable timeTags)
+ public static IEnumerable Sort(IEnumerable timeTags)
{
return timeTags?.OrderBy(x => x.Index)
- .ThenBy(x => x.Time).ToArray();
+ .ThenBy(x => x.Time);
}
///
@@ -182,7 +182,7 @@ List findSelfOverlapping()
}
}
- return Sort(overlappingTimeTagList.Distinct());
+ return Sort(overlappingTimeTagList.Distinct()).ToArray();
}
///
@@ -197,7 +197,7 @@ public static IList FixOverlapping(IList timeTags, GroupCheck
if (timeTags == null || !timeTags.Any())
return timeTags;
- var sortedTimeTags = Sort(timeTags);
+ var sortedTimeTags = Sort(timeTags).ToArray();
var groupedTimeTags = sortedTimeTags.GroupBy(x => x.Index.Index).ToArray();
var overlappingTimeTags = FindOverlapping(timeTags, other, self);
@@ -205,7 +205,7 @@ public static IList FixOverlapping(IList timeTags, GroupCheck
foreach (var overlappingTimeTag in overlappingTimeTags)
{
- int listIndex = sortedTimeTags.IndexOf(overlappingTimeTag);
+ int listIndex = Array.IndexOf(sortedTimeTags, overlappingTimeTag);
var timeTag = overlappingTimeTag.Index;
// fix self-overlapping