Minor changes and improvements

This commit is contained in:
Craftplacer 2020-08-16 01:00:28 +02:00
parent 434354c44c
commit cfd82104db
3 changed files with 3 additions and 5 deletions

View File

@ -55,7 +55,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
} }
} }
private (IBeatmap beatmap, LegacyBeatmapSkin beatmapSkin) decodeFromLegacy(Stream stream) private (IBeatmap beatmap, LegacySkin beatmapSkin) decodeFromLegacy(Stream stream)
{ {
using (var reader = new LineBufferedReader(stream)) using (var reader = new LineBufferedReader(stream))
{ {
@ -65,7 +65,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
} }
} }
private Stream encodeToLegacy((IBeatmap beatmap, LegacyBeatmapSkin beatmapSkin) fullBeatmap) private Stream encodeToLegacy((IBeatmap beatmap, LegacySkin beatmapSkin) fullBeatmap)
{ {
var (beatmap, beatmapSkin) = fullBeatmap; var (beatmap, beatmapSkin) = fullBeatmap;
var stream = new MemoryStream(); var stream = new MemoryStream();

View File

@ -90,9 +90,7 @@ namespace osu.Game.Screens.Edit
using (var stream = new MemoryStream()) using (var stream = new MemoryStream())
{ {
using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true)) using (var sw = new StreamWriter(stream, Encoding.UTF8, 1024, true))
{
new LegacyBeatmapEncoder(editorBeatmap, beatmapSkin).Encode(sw); new LegacyBeatmapEncoder(editorBeatmap, beatmapSkin).Encode(sw);
}
savedStates.Add(stream.ToArray()); savedStates.Add(stream.ToArray());
} }

View File

@ -56,7 +56,7 @@ namespace osu.Game.Skinning
return other != null && return other != null &&
ConfigDictionary.SequenceEqual(other.ConfigDictionary) && ConfigDictionary.SequenceEqual(other.ConfigDictionary) &&
ComboColours.SequenceEqual(other.ComboColours) && ComboColours.SequenceEqual(other.ComboColours) &&
CustomColours.SequenceEqual(other.CustomColours); CustomColours?.SequenceEqual(other.CustomColours) == true;
} }
} }
} }