Optimize GC for enumeration in context cascade insertion.
This commit is contained in:
@@ -126,7 +126,7 @@ namespace Cryville.Crtr {
|
|||||||
public void ContextCascadeInsert() {
|
public void ContextCascadeInsert() {
|
||||||
ContextCascade[_cascadeHeight++].Clear();
|
ContextCascade[_cascadeHeight++].Clear();
|
||||||
}
|
}
|
||||||
public void ContextCascadeInsert(IReadOnlyDictionary<int, PropSrc> srcs) {
|
public void ContextCascadeInsert(IntKeyedDictionary<PropSrc> srcs) {
|
||||||
ContextCascadeInsert();
|
ContextCascadeInsert();
|
||||||
foreach (var src in srcs) ContextCascadeUpdate(src.Key, src.Value);
|
foreach (var src in srcs) ContextCascadeUpdate(src.Key, src.Value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
public class SkinContext {
|
public class SkinContext {
|
||||||
public Transform Transform { get; private set; }
|
public Transform Transform { get; private set; }
|
||||||
public IReadOnlyDictionary<int, PropSrc> PropSrcs { get; private set; }
|
public IntKeyedDictionary<PropSrc> PropSrcs { get; private set; }
|
||||||
public SkinContext(Transform transform, IReadOnlyDictionary<int, PropSrc> propSrcs = null) {
|
public SkinContext(Transform transform, IntKeyedDictionary<PropSrc> propSrcs = null) {
|
||||||
Transform = transform;
|
Transform = transform;
|
||||||
PropSrcs = propSrcs;
|
PropSrcs = propSrcs;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user