From 73547c31ecf70bfca867d4ffec4fee64c08224be Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Sun, 24 Oct 2021 13:46:04 +0100 Subject: [PATCH] Remove MiniYamlNodes alias in MiniYaml. --- OpenRA.Game/MiniYaml.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/OpenRA.Game/MiniYaml.cs b/OpenRA.Game/MiniYaml.cs index 45626935fc..4a803e2455 100644 --- a/OpenRA.Game/MiniYaml.cs +++ b/OpenRA.Game/MiniYaml.cs @@ -17,22 +17,20 @@ using OpenRA.FileSystem; namespace OpenRA { - using MiniYamlNodes = List; - public static class MiniYamlExts { - public static void WriteToFile(this MiniYamlNodes y, string filename) + public static void WriteToFile(this List y, string filename) { File.WriteAllLines(filename, y.ToLines().Select(x => x.TrimEnd()).ToArray()); } - public static string WriteToString(this MiniYamlNodes y) + public static string WriteToString(this List y) { // Remove all trailing newlines and restore the final EOF newline return y.ToLines().JoinWith("\n").TrimEnd('\n') + "\n"; } - public static IEnumerable ToLines(this MiniYamlNodes y) + public static IEnumerable ToLines(this List y) { foreach (var kv in y) foreach (var line in kv.Value.ToLines(kv.Key, kv.Comment)) @@ -99,7 +97,7 @@ namespace OpenRA public MiniYaml Clone() { - var clonedNodes = new MiniYamlNodes(Nodes.Count); + var clonedNodes = new List(Nodes.Count); foreach (var node in Nodes) clonedNodes.Add(node.Clone()); return new MiniYaml(Value, clonedNodes);