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);