Changed MiniYaml.NodesDict property into a method.
Method is now called ToDictionary. - Cached a few invocations into locals which should prevent some redundant evaluation. - Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
This commit is contained in:
@@ -28,7 +28,7 @@ namespace OpenRA.Graphics
|
||||
public CursorSequence(SpriteLoader loader, string cursorSrc, string palette, MiniYaml info)
|
||||
{
|
||||
sprites = loader.LoadAllSprites(cursorSrc);
|
||||
var d = info.NodesDict;
|
||||
var d = info.ToDictionary();
|
||||
|
||||
start = Exts.ParseIntegerInvariant(d["start"].Value);
|
||||
this.palette = palette;
|
||||
|
||||
Reference in New Issue
Block a user