diff --git a/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs b/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs
index d48555780..dacc6f486 100644
--- a/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs
+++ b/osu.Game.Rulesets.Karaoke.Tests/Utils/TimeTagsUtilsTest.cs
@@ -52,7 +52,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 6bc286efb..a7a1fd510 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);
}
///
@@ -177,7 +177,7 @@ IEnumerable findSelfOverlapping()
}
}
- return Sort(overlappingTimeTagList.Distinct());
+ return Sort(overlappingTimeTagList.Distinct()).ToArray();
}
///
@@ -192,7 +192,7 @@ public static IList FixOverlapping(IList timeTags, GroupCheck
if (!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);
@@ -200,7 +200,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