Simplify collection initialization
This commit is contained in:
committed by
atlimit8
parent
cae43808d9
commit
aa998a46d9
@@ -154,8 +154,10 @@ namespace OpenRA
|
||||
if (stringPool == null)
|
||||
stringPool = new Dictionary<string, string>();
|
||||
|
||||
var levels = new List<List<MiniYamlNode>>();
|
||||
levels.Add(new List<MiniYamlNode>());
|
||||
var levels = new List<List<MiniYamlNode>>
|
||||
{
|
||||
new List<MiniYamlNode>()
|
||||
};
|
||||
|
||||
var lineNo = 0;
|
||||
foreach (var ll in lines)
|
||||
@@ -323,8 +325,10 @@ namespace OpenRA
|
||||
var resolved = new Dictionary<string, MiniYaml>(tree.Count);
|
||||
foreach (var kv in tree)
|
||||
{
|
||||
var inherited = new Dictionary<string, MiniYamlNode.SourceLocation>();
|
||||
inherited.Add(kv.Key, default(MiniYamlNode.SourceLocation));
|
||||
var inherited = new Dictionary<string, MiniYamlNode.SourceLocation>
|
||||
{
|
||||
{ kv.Key, default(MiniYamlNode.SourceLocation) }
|
||||
};
|
||||
|
||||
var children = ResolveInherits(kv.Value, tree, inherited);
|
||||
resolved.Add(kv.Key, new MiniYaml(kv.Value.Value, children));
|
||||
|
||||
Reference in New Issue
Block a user