1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00

Merge branch 'master' into efficient-user-retrieval

This commit is contained in:
Dean Herbert 2020-11-09 19:41:44 +09:00
commit d99e1ba8dd
3 changed files with 12 additions and 2 deletions

View File

@ -37,6 +37,12 @@ namespace osu.Game.Tests.Editing
}));
}
[Test]
public void TestPatchNoObjectChanges()
{
runTest(new OsuBeatmap());
}
[Test]
public void TestAddHitObject()
{

View File

@ -235,11 +235,11 @@ namespace osu.Game.Beatmaps.Formats
private void handleHitObjects(TextWriter writer)
{
writer.WriteLine("[HitObjects]");
if (beatmap.HitObjects.Count == 0)
return;
writer.WriteLine("[HitObjects]");
foreach (var h in beatmap.HitObjects)
handleHitObject(writer, h);
}

View File

@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using DiffPlex;
@ -35,6 +36,9 @@ namespace osu.Game.Screens.Edit
int oldHitObjectsIndex = Array.IndexOf(result.PiecesOld, "[HitObjects]");
int newHitObjectsIndex = Array.IndexOf(result.PiecesNew, "[HitObjects]");
Debug.Assert(oldHitObjectsIndex >= 0);
Debug.Assert(newHitObjectsIndex >= 0);
var toRemove = new List<int>();
var toAdd = new List<int>();