]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/gourlay-breaking.cc
*** empty log message ***
[lilypond.git] / lily / gourlay-breaking.cc
index 4143f0f11cdf2c063ead8b51baf10ac35219a590..24eeb934a8a5c12a6f93d7f64789a27da38dee99 100644 (file)
@@ -77,15 +77,15 @@ Gourlay_breaking::do_solve () const
 {
   Array<Break_node> optimal_paths;
   Link_array<Grob> all
-    = pscore_->system_->columns ();
+    = pscore_->root_system ()->columns ();
 
   Array<int> breaks = find_break_indices ();
 
   Break_node first_node;
   optimal_paths.push (first_node);
 
-  bool ragged_right = to_boolean (pscore_->layout_->c_variable ("raggedright"));
-  bool ragged_last = to_boolean (pscore_->layout_->c_variable ("raggedlast"));
+  bool ragged_right = to_boolean (pscore_->layout ()->c_variable ("raggedright"));
+  bool ragged_last = to_boolean (pscore_->layout ()->c_variable ("raggedlast"));
 
   Real worst_force = 0.0;
   for (int break_idx = 1; break_idx < breaks.size (); break_idx++)
@@ -111,7 +111,7 @@ Gourlay_breaking::do_solve () const
          cp.cols_ = line;
 
          Interval line_dims
-           = line_dimensions_int (pscore_->layout_, optimal_paths[start_idx].line_);
+           = line_dimensions_int (pscore_->layout (), optimal_paths[start_idx].line_);
          Simple_spacer_wrapper *sp = generate_spacing_problem (line, line_dims);
          bool last_line = break_idx == breaks.size () - 1;
          bool ragged = ragged_right
@@ -263,7 +263,7 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev,
 
        add 20000 to the demerits, so that a break penalty
        of -10000 won't change the result */
-      demerit = (demerit + 20000) >? 2000;
+      demerit = max ((demerit + 20000), 2000.0);
 
       demerit *= 10;
     }