X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpaper-score.cc;h=e7a5f51247a9ac69ae1c6ffa603881255cc22c9f;hb=52c2fa58a215d4d7218d7491fbac51e0de7df31e;hp=ffad13c38b076c0b0b171f0abd24b096e1336f59;hpb=2893f2dd20c081c06c1c7356551344801f8a233a;p=lilypond.git diff --git a/lily/paper-score.cc b/lily/paper-score.cc index ffad13c38b..e7a5f51247 100644 --- a/lily/paper-score.cc +++ b/lily/paper-score.cc @@ -10,7 +10,6 @@ #include "all-font-metrics.hh" #include "book.hh" -#include "gourlay-breaking.hh" #include "international.hh" #include "main.hh" #include "misc.hh" @@ -100,24 +99,17 @@ Paper_score::get_columns () const vector Paper_score::calc_breaking () { - Break_algorithm *algorithm = 0; + Constrained_breaking algorithm; vector sol; message (_ ("Calculating line breaks...") + " "); int system_count = robust_scm2int (layout ()->c_variable ("system-count"), 0); if (system_count) - { - Constrained_breaking *b = new Constrained_breaking; - b->resize (system_count); - algorithm = b; - } - else - algorithm = new Gourlay_breaking; + algorithm.resize (system_count); - algorithm->set_pscore (this); - sol = algorithm->solve (); - delete algorithm; + algorithm.set_pscore (this); + sol = algorithm.solve (); return sol; }