Code cleanup.
This commit is contained in:
@@ -53,10 +53,11 @@ namespace Cryville.Crtr {
|
||||
public SkinElement elements;
|
||||
|
||||
public void Optimize(PdtEvaluator etor) {
|
||||
foreach (var animation in animations.Values) {
|
||||
animation.Optimize(etor);
|
||||
foreach (var a in animations) {
|
||||
a.Value.Optimize(etor);
|
||||
}
|
||||
foreach (var effect in effects.Values) {
|
||||
foreach (var e in effects) {
|
||||
var effect = e.Value;
|
||||
etor.ContextCascadeInsert();
|
||||
if (effect.args != null) foreach (var i in effect.args) {
|
||||
etor.ContextCascadeUpdate(i.Key, PropSrc.Error);
|
||||
@@ -85,9 +86,9 @@ namespace Cryville.Crtr {
|
||||
|
||||
public void Optimize(PdtEvaluatorBase etor) {
|
||||
IsDynamic = true;
|
||||
foreach (var e in properties.Values) {
|
||||
etor.Optimize(e);
|
||||
if (!e.IsConstant)
|
||||
foreach (var e in properties) {
|
||||
etor.Optimize(e.Value);
|
||||
if (!e.Value.IsConstant)
|
||||
IsDynamic = true;
|
||||
}
|
||||
foreach (var e in elements) {
|
||||
@@ -115,11 +116,11 @@ namespace Cryville.Crtr {
|
||||
= new Dictionary<SkinPropertyKey, PdtExpression>();
|
||||
|
||||
public void Optimize(PdtEvaluator etor) {
|
||||
foreach (var p in properties.Values) {
|
||||
etor.Optimize(p);
|
||||
foreach (var p in properties) {
|
||||
etor.Optimize(p.Value);
|
||||
}
|
||||
foreach (var e in spans.Values) {
|
||||
e.Optimize(etor);
|
||||
foreach (var e in spans) {
|
||||
e.Value.Optimize(etor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user