1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Fix formatting

This commit is contained in:
Craftplacer 2020-08-23 15:23:10 +02:00
parent e6646b9877
commit 492be0e016
3 changed files with 9 additions and 12 deletions

View File

@ -45,12 +45,10 @@ namespace osu.Game.Tests.Beatmaps.Formats
Assert.IsTrue(decoded.beatmapSkin.Configuration.Equals(decodedAfterEncode.beatmapSkin.Configuration));
}
private void sort((IBeatmap, LegacyBeatmapSkin) bs)
private void sort((IBeatmap beatmap, LegacyBeatmapSkin beatmapSkin) tuple)
{
var (beatmap, beatmapSkin) = bs;
// Sort control points to ensure a sane ordering, as they may be parsed in different orders. This works because each group contains only uniquely-typed control points.
foreach (var g in beatmap.ControlPointInfo.Groups)
foreach (var g in tuple.beatmap.ControlPointInfo.Groups)
{
ArrayList.Adapter((IList)g.ControlPoints).Sort(
Comparer<ControlPoint>.Create((c1, c2) => string.Compare(c1.GetType().ToString(), c2.GetType().ToString(), StringComparison.Ordinal)));
@ -67,7 +65,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
new BeatmapSetFileInfo
{
Filename = name,
FileInfo = new osu.Game.IO.FileInfo() { Hash = name }
FileInfo = new osu.Game.IO.FileInfo { Hash = name }
}
};

View File

@ -23,7 +23,7 @@ namespace osu.Game.Skinning
public readonly int Keys;
public IDictionary<string, Color4> CustomColours { get; set; } = new SortedDictionary<string, Color4>();
public IDictionary<string, Color4> CustomColours { get; } = new SortedDictionary<string, Color4>();
public Dictionary<string, string> ImageLookups = new Dictionary<string, string>();

View File

@ -47,14 +47,13 @@ namespace osu.Game.Skinning
public void AddComboColours(params Color4[] colours) => comboColours.AddRange(colours);
public IDictionary<string, Color4> CustomColours { get; set; } = new SortedDictionary<string, Color4>();
public IDictionary<string, Color4> CustomColours { get; } = new SortedDictionary<string, Color4>();
public readonly SortedDictionary<string, string> ConfigDictionary = new SortedDictionary<string, string>();
public bool Equals(SkinConfiguration other)
=> other != null
&& ConfigDictionary.SequenceEqual(other.ConfigDictionary)
&& ComboColours.SequenceEqual(other.ComboColours)
&& CustomColours?.SequenceEqual(other.CustomColours) == true;
public bool Equals(SkinConfiguration other) => other != null
&& ConfigDictionary.SequenceEqual(other.ConfigDictionary)
&& ComboColours.SequenceEqual(other.ComboColours)
&& CustomColours?.SequenceEqual(other.CustomColours) == true;
}
}