perf(fill): avoid unused scores with custom comparers

This commit is contained in:
aj
2026-09-25 17:18:15 -04:00
parent b318950a54
commit cec7396da6
5 changed files with 556 additions and 3 deletions
+2 -2
View File
@@ -51,11 +51,11 @@ namespace OpenNest.Engine.Strategies
var h = engine.Fill(pattern, NestDirection.Horizontal);
if (h != null && h.Count > 0)
results.Add((h, FillScore.Compute(h, workArea)));
results.Add((h, comparer == null ? FillScore.Compute(h, workArea) : default));
var v = engine.Fill(pattern, NestDirection.Vertical);
if (v != null && v.Count > 0)
results.Add((v, FillScore.Compute(v, workArea)));
results.Add((v, comparer == null ? FillScore.Compute(v, workArea) : default));
}
);