Code cleanup.

This commit is contained in:
2023-01-15 11:54:11 +08:00
parent 898fb7d557
commit 609bb317d0
5 changed files with 91 additions and 31 deletions

View File

@@ -116,14 +116,14 @@ namespace Cryville.Crtr {
etor.Optimize(_exp);
}
public override IEnumerable<Transform> MatchStatic(ContainerState h, Transform a) {
var result = Match(h, a);
if (result != null) return new Transform[] { Match(h, a) };
var result = Match(a);
if (result != null) return new Transform[] { result };
else return Enumerable.Empty<Transform>();
}
public override Transform MatchDynamic(ContainerState h, Transform a) {
return Match(h, a, true);
return Match(a, true);
}
public Transform Match(ContainerState h, Transform a, bool dyn = false) {
public Transform Match(Transform a, bool dyn = false) {
ChartPlayer.etor.ContextTransform = a;
try {
ChartPlayer.etor.Evaluate(_op, _exp);