X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftie-formatting-problem.cc;h=d4a7be2cfb7cbab6117edceaf08c63ff3ed7667b;hb=918231bde3dd1cb29865b5f29ee3c1fadee93935;hp=ad08638ebb000d81b22ba4a050c7f0aa0e2a0636;hpb=0694f44d61203d9e8d26cd9bc83b46f2addb2c7f;p=lilypond.git diff --git a/lily/tie-formatting-problem.cc b/lily/tie-formatting-problem.cc index ad08638ebb..d4a7be2cfb 100644 --- a/lily/tie-formatting-problem.cc +++ b/lily/tie-formatting-problem.cc @@ -39,6 +39,10 @@ #include "pointer-group-interface.hh" #include "output-def.hh" +using std::set; +using std::string; +using std::vector; + void Tie_formatting_problem::print_ties_configuration (Ties_configuration const *ties) { @@ -99,7 +103,7 @@ Tie_formatting_problem::set_column_chord_outline (vector bounds, for (vsize i = 0; i < bounds.size (); i++) { Grob *head = bounds[i]; - if (!Note_head::has_interface (head)) + if (!has_interface (head)) continue; if (!stem) @@ -280,7 +284,7 @@ Tie_formatting_problem::set_chord_outline (vector bounds, for (vsize i = 0; i < bounds.size (); i++) ranks.push_back (bounds[i]->get_column ()->get_rank ()); - vector_sort (ranks, less ()); + vector_sort (ranks, std::less ()); uniq (ranks); for (vsize i = 0; i < ranks.size (); i++) @@ -477,7 +481,7 @@ Tie_formatting_problem::generate_configuration (int pos, Direction dir, } if (y_tune - && max (fabs (get_head_extent (columns[LEFT], LEFT, Y_AXIS)[dir] - y), + && std::max (fabs (get_head_extent (columns[LEFT], LEFT, Y_AXIS)[dir] - y), fabs (get_head_extent (columns[RIGHT], RIGHT, Y_AXIS)[dir] - y)) < 0.25 && !Staff_symbol_referencer::on_line (details_.staff_symbol_referencer_, pos)) { @@ -573,7 +577,7 @@ Tie_formatting_problem::generate_configuration (int pos, Direction dir, continue; conf->attachment_x_[d] - = d * min (d * conf->attachment_x_[d], + = d * std::min (d * conf->attachment_x_[d], d * (get_stem_extent (conf->column_ranks_[d], d, X_AXIS)[-d] - d * details_.stem_gap_)); } } @@ -621,7 +625,7 @@ Tie_formatting_problem::score_aptitude (Tie_configuration *conf, } { - Real relevant_dist = max (fabs (curve_y - tie_y) - 0.5, 0.0); + Real relevant_dist = std::max (fabs (curve_y - tie_y) - 0.5, 0.0); Real p = details_.vertical_distance_penalty_factor_ * convex_amplifier (1.0, 0.9, relevant_dist); if (ties_conf) ties_conf->add_tie_score (p, tie_idx, "vdist");