mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Compare by char
Co-authored-by: Berkan Diler <berkan.diler1@ingka.ikea.com>
This commit is contained in:
parent
776e7c0c71
commit
5a18547342
@ -82,13 +82,13 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
// Find the index of [HitObject] sections. Lines changed prior to this index are ignored.
|
||||
int oldSectionStartIndex = Array.IndexOf(result.PiecesOld, $"[{section}]");
|
||||
int oldSectionEndIndex = Array.FindIndex(result.PiecesOld, oldSectionStartIndex + 1, s => s.StartsWith(@"[", StringComparison.Ordinal));
|
||||
int oldSectionEndIndex = Array.FindIndex(result.PiecesOld, oldSectionStartIndex + 1, s => s.StartsWith('['));
|
||||
|
||||
if (oldSectionEndIndex == -1)
|
||||
oldSectionEndIndex = result.PiecesOld.Length;
|
||||
|
||||
int newSectionStartIndex = Array.IndexOf(result.PiecesNew, $"[{section}]");
|
||||
int newSectionEndIndex = Array.FindIndex(result.PiecesNew, newSectionStartIndex + 1, s => s.StartsWith(@"[", StringComparison.Ordinal));
|
||||
int newSectionEndIndex = Array.FindIndex(result.PiecesNew, newSectionStartIndex + 1, s => s.StartsWith('['));
|
||||
|
||||
if (newSectionEndIndex == -1)
|
||||
newSectionEndIndex = result.PiecesOld.Length;
|
||||
|
Loading…
Reference in New Issue
Block a user