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:
@@ -118,7 +118,7 @@ namespace OpenRA.Graphics
|
||||
else
|
||||
{
|
||||
t = Exts.Lazy(() => (IReadOnlyDictionary<string, Sequence>)new ReadOnlyDictionary<string, Sequence>(
|
||||
node.Value.NodesDict.ToDictionary(x => x.Key, x =>
|
||||
node.Value.ToDictionary().ToDictionary(x => x.Key, x =>
|
||||
{
|
||||
using (new Support.PerfTimer("new Sequence(\"{0}\")".F(node.Key), 20))
|
||||
return new Sequence(spriteLoader.Value, node.Key, x.Key, x.Value);
|
||||
|
||||
Reference in New Issue
Block a user