Skip to content

Commit

Permalink
Run optimisations on merged blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
NeRdTheNed committed Nov 9, 2023
1 parent 37a60cf commit 6cf332f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,13 @@ public long optimise() {
// TODO Try other types of blocks
// TODO Try merging more block types
// TODO Try merging blocks at different passes
saved += mergeBlocks();
final long mergeSaved = mergeBlocks();
saved += mergeSaved;

if (mergeSaved > 0) {
return saved + optimise();
}

return saved;
}

Expand Down

0 comments on commit 6cf332f

Please sign in to comment.